Re: what do I need?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 05, 2010 at 13:52:44PM -0600, Tim Chase wrote:
> 
>    for f in *.zip; do unzip "$f"; done
> 
> should do the trick.  (I also like to put the "$f" in 
> double-quotes in case any of my file-names have spaces in them).

There are still possible gotchas, a non-rarity being a file that
has a dash ("-") as the first character; you'd then guard against
that by substituting "$f" with "./$f".  There are probably others ...

Sometimes when a loop is inconvenient, the "xargs" command is used instead:

     ls *.zip | xargs -n1 unzip

As noted elsewhere in this thread, the idea of unzipping multiple files
all into the same relative directory may not yield desired results.

-- 
Henry Yen                                       Aegis Information Systems, Inc.
Senior Systems Programmer                       Hicksville, New York

_______________________________________________
Blinux-list mailing list
Blinux-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/blinux-list

[Index of Archives]     [Linux Speakup]     [Fedora]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]