yes this helps! i take your point about using * like that, the backquote 
thing seems quite useful, i have been doing some surfing just prior to 
reading your mail as and as i read things the backquotes mean that you can 
execute a command and have the result take that place in the script,
i totally failed to find this in a book i bought to help me learn basic 
scripting, if anyone else reads this DO NOT purchase 'Linux Programming For 
Dummies' it seems to be too basic and the examples are full of typos, at 
least i think they are - being a newbie i could just have misunderstood thme 
but i'm fairly certain there are misprints,

bascule

On Friday 07 September 2001 2:17 am, you wrote:

>
> Sorry, not familiar with unzip syntax.  However, a
> couple of comments on your script that might help.
> Firstly, never safe to just do * like that, as there
> may be other files there that you DON'T want
> processed.  Far better to use backquotes and the ls
> command, viz:
> for file in `ls *.zip`
>
> Secondly, if the -d option isn't working, how about
> doing this:  for each file, create a unique
> subdirectory, move the zip file there, go there and
> run the unzip there.  Script might look like:
> for file in `ls *.zip`
> do
>   set base=basename_$file
>   mkdir $base
>   mv $file $base
>   cd $base
>   unzip $file (or whatever the syntax is)
>   cd ..
> done
>
> Not elegant, but simple (I'd test it first on a couple
> of files copied somewhere safe to play).  Elegance is
> over-rated if it means impossible to understand
> oneliners that try to do everything!
>
> Hope this helps,
> Ron.
>
> __________________________________________________
> Do You Yahoo!?
> Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
> http://im.yahoo.com


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to