[clue-tech] Re: LUNA: Script for Unzipping?

David Anselmi anselmi at anselmi.us
Sat Apr 30 18:14:20 MDT 2005


Joseph A. Nagy, Jr. wrote:
[...]
> for i in `ls *zip`; do unzip "$i"; done

Gads no!  It's:

for i in *zip; do unzip "$i"; done

And realize that if *zip expands to a command line that's too long this 
will fail.  (I tried to blow up bash on Linux recently and couldn't 
(though I did run out of memory) but with ksh on Solaris 8 this is easy 
to do.)

> That does the job admirably, now I just need to smack the heck out of the
> unzip program (or the archive creators) for asking me, repeatedly, if I want
> to overwrite txt files (I do) or rename ttf files (I do). Hehe. :p

How about -o?  (You do have the man page, don't you?)  And in case you 
don't want to overwrite fonts you can use -d to put stuff in an out of 
the way directory.

Dave



More information about the clue-tech mailing list