commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
I like it sorted...
2> /dev/null was also needless, since our pipes already select stdin, only.
There are 2 alternatives - vote for the best!
no loop, only one call of grep, scrollable ("less is more", more or less...)
compgen -c finds everything in your path.
Just realized how needless the 'ls' has been...
This version is also multilingual, since there is no need to grep for a special key word ("nothing"/"nichts"/"rien"/"nada"...). And it makes use of all the available horizontal space.
If you can do better, submit your command here.
You must be signed in to comment.