Better -and faster- using bash printf. Show Sample Output
#Sample Usage: # git commit -m"Jira #404 - `whatthecommit`" # Show Sample Output
Of course, this command must be executed at a GRID User Interface lhcb - name of your VO, substitute it with the one you are interested it. Show Sample Output
The first grep rejects capitalised words since the dict has proper nouns in it that you mightn't want to use. The second grep rejects words with ending in apostrophe s, and the third forces the words to be at least 15 characters long. Show Sample Output
Not always does Xorg run on :0. For times like those, this script allows you to find out which it is.
This was tested on Ubuntu 12.04 (Precise) LTS Server. It returns the name of the symlink within /dev/disk/by-id for the physical drive you specify. Change /dev/sda to the one you want, and replace ata- with scsi- or the appropriate type for your drive. I used this to pre-configure grub-pc during a non-interactive install because I had to tell it which disk to install grub on, and physical disks don't have a UUID such as that blkid provides.
Change :alnum: to :graph: for all printable characters Show Sample Output
This will, for an application that has already been removed but had its configuration left behind, purge that configuration from the system. To test it out first, you can remove the last -y, and it will show you what it will purge without actually doing it. I mean it never hurts to check first, "just in case." ;)
eliminates "l" and "o" characters change length by changing 'x' here: cut -c 1-x Show Sample Output
This will get the mac address of the eth0 and change lowercase to uppercase. The sed command removed the colons.
all files in the directory get moved, in doing so the new name of the file is the original name with out spaces (using translate command)
apt install toilet toilet-fonts # replace 'tput setaf 1' with 'tput setaf 9' to change color
This command might not be useful for most of us, I just wanted to share it to show power of command line. Download simple text version of novel David Copperfield from Poject Gutenberg and then generate a single column of words after which occurences of each word is counted by sort | uniq -c combination. This command removes numbers and single characters from count. I'm sure you can write a shorter version. Show Sample Output
This is a safest variation for "sitepass function" that includes a SALT over a long loop for sha512sum hash Show Sample Output
Generates a password using symbols, alpha, and digits. No repeating chars. Show Sample Output
This command will grep the entire directory looking for any files containing the list of files. This is useful for cleaning out your project of old static files that are no longer in use. Also ignores .svn directories for accurate counts. Replace 'static/images/' with the directory containing the files you want to search for. Show Sample Output
Will rot 13 whatever parameter follows 'rot13', whether it is a string or a file. Additionally, it will rot 5 each digit in a number
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: