Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: "unarchive" script/function?
- X-seq: zsh-users 13659
- From: "Vin Shelton" <acs@xxxxxxxxxxxxxxxxxxxx>
- To: TjL <luomat@xxxxxxxxx>
- Subject: Re: "unarchive" script/function?
- Date: Wed, 7 Jan 2009 11:37:01 -0500
- Cc: zsh-users@xxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=0tQ2IsDhiwD2dBqZJ4/74kQZG+Pzy9Q835dov9gPNA0=; b=qFtO+HnHqXPPBcvl5TRDeTe4Vz5YnRhtdG/UmvBUq8HdmkEvLAIn+ipL4JeZHk1V3V eHBPKu9C2uUyRnZHIdLKjvN+KjV0oFNhPiURd+QVkT2pwudlIZm57s72gRU22bjVSj2x 7H1MVw4PAYVcvhP+9RE2EuK6CS711EK3ABU8E=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=FM4iqNUtzR2CWWIZlweGw+dIbVfS9VTnPLK61ahvF3Z5AlbJuOh4/Jv02FOOSUWaac Lm8yFIRGJvrXgMO/OJ17E0jIytf430xmjYWq7OZ58YgL6yle/bv+5LookaPhIEImWE72 hcbFbFtYD4z/LoFeO6U5OuN4Zix4zLOTNijvY=
- In-reply-to: <d2ecb10b0901070818v44d2bbbdvb03b11d0fb0410e0@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <d2ecb10b0901070818v44d2bbbdvb03b11d0fb0410e0@xxxxxxxxxxxxxx>
- Sender: ethersoft@xxxxxxxxx
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.
Regards,
On Wed, Jan 7, 2009 at 11:18 AM, TjL <luomat@xxxxxxxxx> wrote:
> Years ago I remember seeing a function that someone had posted (to
> this list, I believe) which would unarchive a whole bunch of different
> formats.
>
> Basically I want to be able to throw any kind of archive/compression
> method and have them all dealt with, so I could theoretically do this:
>
>
> unarchive file1.zip file2.tar file3.tbz file4.tar.gz
>
>
> and the "unarchive' program would know what to do with each.
>
> I wrote something of my own, but I can't get it to figure out what to
> do when there is a .tar.gz instead of a .tgz (i.e. two file
> extensions). It ends up seeing .gz and just gunzip'ing. I'm not great
> at regex matching, and I'm sure there's a better way than what I'm
> doing.
>
> Before I re-invent the wheel, does anyone have something like this
> already written up?
>
> TjL
>
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author