[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Make x-option to extract no matter what format (bz2...)
From: |
Stepan Kasal |
Subject: |
Re: Make x-option to extract no matter what format (bz2...) |
Date: |
Fri, 21 Jan 2005 14:40:17 +0100 |
User-agent: |
Mutt/1.4.1i |
Hi,
thank you for thinking about tar enhancements.
On Fri, Jan 21, 2005 at 12:10:38PM +0200, Jari Aalto wrote:
> this "Generic extraction".
I don't think this is necessary; bloat (http://bloat.sf.net) can do this
and much more.
> In shell scripts it would be much easier.
On the contrary, I'd say it might help on cmd-line.
In a script, you can easily do something like
case $archive in
*.gz) dec="gzip -dc";;
*.bz2) dec="bzip2 -dc";;
esac
$dec "$archive" | tar xvf -
> rzip rzip.samba.org
> lzop www.lzop.org
rzip cannot decompress to stdout, so it might be a bit tricky:
rzip -kdo "${archive%.rz}" "$archive"
tar xvf "${archive%.rz}"
rm "${archive%.rz}"
Regards,
Stepan Kasal