MaheshT.com

December 27, 2009

Looping from unix command line

Filed under: Linux — MaheshT @ 8:05 pm
You can directly run a loop from the command line instead of running command repeatedly or writing a shell script.
For example to untar all files from the home folder as follows.
for i in ls ~/home/*.tar ; do tar -xvf $i ; done 

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URL

Sorry, the comment form is closed at this time.

Powered by WordPress