Lawrence Bowie wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
for i in `ls -1 *.rar`; do unrar x $i; done (assumes BASH)
or
ls -1 *.rar | xargs -i unrar x {}
David Crouch wrote:
HI all.
I used to know how to do this, but apparently I've forgotten :( I know I can use a for loop to process all the files in a directory, but I can't for the life of me remember how to do it. I have a bunch of archived files that I want to unarchive. I've tried for I in *rar:do 'unrar x $I.rar':done, but that doesn't work and I can't seem to find the right man page with the syntax. Any help?
Appreciated in advance.
-- David Crouch
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFDkd+FXk+Xn2ZNlsQRArfTAJsEDnXH8SOjb4jZrNEPEMyPkT5P5gCfURR4 lij8kRt9Y10lzR56A4fpesI= =wIxR -----END PGP SIGNATURE-----
Ah, thank you very much. I knew I was close. :)