Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: "unarchive" script/function?
- X-seq: zsh-users 13660
- From: Dan Nelson <dnelson@xxxxxxxxxxxxxxx>
- To: Vin Shelton <acs@xxxxxxxxxxxxxxxxxxxx>
- Subject: Re: "unarchive" script/function?
- Date: Wed, 7 Jan 2009 11:10:27 -0600
- Cc: TjL <luomat@xxxxxxxxx>, zsh-users@xxxxxxxxxx
- In-reply-to: <20a807210901070837w39b54800i408239885888180d@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <d2ecb10b0901070818v44d2bbbdvb03b11d0fb0410e0@xxxxxxxxxxxxxx> <20a807210901070837w39b54800i408239885888180d@xxxxxxxxxxxxxx>
In the last episode (Jan 07), Vin Shelton said:
> tar now natively understands (at least) gzip, bzip2, lzma and compress.
>
> so, eg, tar tvf foo.tgz "just works".
>
> See http://www.gnu.org/software/tar/ for details. tar does not seem
> to understand zip format, though.
bsdtar does, in addition to ar, cpio, and iso9660 formats:
http://people.freebsd.org/~kientzle/libarchive/
But as far as doing it in zsh scripting, I think you want a big case
statement matching on things like *.zip, *.(tgz|tar.gz), etc, with the
longer matches up front so they get hit first.
--
Dan Nelson
dnelson@xxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author