Unzip again
Mitchell Smith
mjs at datafast.net.au
Sun Aug 25 05:21:25 EDT 2002
Something like
ls -1 *.zip | awk '{print "unzip "$1}' | bash
would work
or you could
ls -1 | awk '{print "unzip "$1}' > unzipscript
and then
sh unzipscript
Hope this helps.
----- Original Message -----
From: "Toby Fisher" <toby_fisher at bigfoot.com>
To: <speakup at braille.uwo.ca>
Sent: Sunday, August 25, 2002 5:23 PM
Subject: Re: Unzip again
> On Sun, 25 Aug 2002, Kerry Hoath wrote:
>
> > No Toby; the shell expands the file names.
> > assume we have foo.zip and bar.zip in the current directory;
> > unzip *.zip will pass the command line
> > unzip bar.zip foo.zip
> > and since unzip can't find foo.zip in bar.zip it failes.
> > You need to do
> > unzip \*.zip
> > or
> > unzip "*.zip"
> > or anything else thaat will let the wildcards past the shell.
>
> Arg, forgot that, sorry. Will command substitution work? Like:
> unzip `ls -l *.zip`
> or pipes
> ls |grep zip |unzip
> or even:
> ls *.zip | unzip
>
> > For an example of shell wildcard expantion try
> > echo *
> > in a directory; poor-man's ls.
>
> Haha yes, very poor, it doesn't even wrap gracefully!
>
> Cheers.
>
> --
> Toby Fisher Email: toby at g0ucu.freeserve.co.uk
> Tel.: +44(0)1480 417272 Mobile: +44(0)7974 363239
> ICQ: #61744808
> Please avoid sending me Word or PowerPoint attachments.
> See http://www.fsf.org/philosophy/no-word-attachments.html
>
>
>
> _______________________________________________
> Speakup mailing list
> Speakup at braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup
>
More information about the Speakup
mailing list