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:
Works on current directory, with built-in sorting.
There are 2 alternatives - vote for the best!
... plus do a sort according frequency
Get the longest match of file extension (Ex. For 'foo.tar.gz', you get '.tar.gz' instead of '.gz')
Just a little simplification.
If your grep doesn't have an -o option, you can use sed instead.
A shorter version
If you can do better, submit your command here.
You must be signed in to comment.