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:
Replace the echo command with whatever commands you want.
'read' reads a line from stdin and places the text in the variable, the stdin of the while loop comes from the find command.
Note that with simple commands, an easier way is using the '-exec' option of find. My command is useful if you want to execute multiple commands in the loop.
There are 2 alternatives - vote for the best!
If you can do better, submit your command here.
You must be signed in to comment.