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:
use -iname \*[.ch] instead of -iname \*.c -o -iname \*.h
There are 9 alternatives - vote for the best!
indenting all the files at a time, if the file has local variable for indentation style its even better.
This one liner is not pretty but it does the job.
Use find's exec and reduce the need for multiple evals with a progn wrapper.
This version uses the indent C formatting utility. Doesn't appear to be included with ubuntu. But CentOS and MacOS have it.
If you can do better, submit your command here.
You must be signed in to comment.