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:
Recursively find php files and replace tab characters with spaces.
"\*.php" -- replace this with the files you wish to find
"expand" -- replace tabs with spaces (use "unexpand" to replace spaces with tabs)
"-t4" -- tabs represent 4 spaces
Note: The IFS="" in the middle is to prevent 'read' from eating leading/trailing whitespace in filenames.
There are 6 alternatives - vote for the best!
The sample command searches for PHP files replacing tabs with spaces.
-u NONE # don't use vimrc
one may pass
Look at this http://susepaste.org/69028693 also
If you can do better, submit your command here.
You must be signed in to comment.