Click to See Complete Forum and Search --> : Command / Script question


StarWeaver
11-23-2000, 07:13 PM
What's an easy way to, say, take a file consiting of a bunch of filenames on thier own lines (IE 'tar -zxvf filename > file' output) and feed each one to RM sequentially?

Thanks
-Ronin Agnel StarWeaver

mastersibn
11-23-2000, 09:42 PM
Originally posted by StarWeaver:
What's an easy way to, say, take a file consiting of a bunch of filenames on thier own lines (IE 'tar -zxvf filename > file' output) and feed each one to RM sequentially?


Thanks
-Ronin Agnel StarWeaver

If you mean to untar/gunzip lots of files, and then delete the compressed archives, it's simple:
for i in `ls | grep .tar.gz`;do tar xzvf $i;rm $i;done

I think I just posted this same command somewhere else within the last few hours...


------------------
grab my gnupg key (http://jove.prohosting.com/~msibn/sibn-p.asc) if you feel so inclined.


cAPS lOCK? wHAT cAPS lOCK?
I cna ytpe 300 wrods pre mniuet!!!

StarWeaver
11-23-2000, 11:56 PM
Well i meant more to take a list of file i just accidently untared in the wrong place and elimiante them. But i'll look into that. :)

-RASX