This command line detect ldap hosts, by mandatory dns entry, then ping them to detect response average. based on ping response average it sorts and print the faster server in first output line Show Sample Output
shell generate random strong password Show Sample Output
Even shorter:
seq -s '*' 120|tr -d '[0-9]'
Works for debian and ubuntu based distros. Show Sample Output
move filename/rename filenames with Uppercase to lowercase in current directory Show Sample Output
Given a requirements.txt file with unpinned package names, output the packages pinned to the latest version. Handy to copy/paste back into your requirements.txt when you start a new project. Note that this will download packages but not install them. Show Sample Output
Scans the file once to build a list of line numbers that contain non-printable characters Scans the file again, passing those line numbers to sed as two commands to print the line number and the line itself. Also passes the output through a tr to replace the characters with a ? Show Sample Output
enlubtsqyuse
cat /tmp/out
subsequently
Show Sample Output
This works on my ubuntu/debian machines. I suspect other distros need some tweaking of sort and cut. I am sure someone could provide a shorter/faster version.
The variable WIRELESSINTERFACE indicates your wireless interface
Infinitely plays beeps with sinusoidally changing sound frequency. Ideal for alarm on an event.
translate and number lines is simpler and you use tr to choose your delimiter (eg for csv files) Show Sample Output
grab the weather, with a little expletive fun. replace the 48104 with a US zipcode, or the name of your city (such as ZIP="oslo"), unless you want to know what the weather is like for me (and that's fine too) Show Sample Output
Sorts a character string, using common shell commands. Show Sample Output
I use it for embedding images in CSS for Stylish, the Firefox addon. Thought it might be useful to others.
generate password Show Sample Output
if you, like me, do not have the numsum, this way can do the same. Show Sample Output
not the best, uses 4 pipes!
I noticed some spammer posted an advertisement here for "not bad" encryption. Unfortunately, their software only runs under Microsoft Windows and fails to work from the commandline. My shell script improves upon those two aspects, with no loss in security, using the exact same "military-grade" encryption technology, which has the ultra-cool codename "ROT-13". For extra security, I recommend running ROT-13 twice. Show Sample Output
add integers from the stdin and print out the result usually, cat /tmp/file | echo $(($(tr '\n' '+')0)) Show Sample Output
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: