[oclug] "tar" problem
Dave Edwards
dle1 at sympatico.ca
Thu Oct 3 17:00:47 EDT 2002
On Thu, 2002-10-03 at 16:52, Joe Burpee wrote:
> On Thu, 03 Oct 2002 at 16:28:29 -0400, Dave Edwards wrote:
> > On Thu, 2002-10-03 at 15:32, Joe Burpee wrote:
> > > On RedHat you can get a contents listing by typing
> > > less <tarballname>
> > >
> > > This works because $LESSOPEN points to /usr/bin/lesspipe.sh, which
> > > handles .tgz, .tar.gz, .tar.bz2, .zip, .Z, etc.
> > >
> > Thanks, Joe. That is useful. When I tried it, it just less'd the tar
> > archive to the console. So I looked at /usr/bin/lesspipe.sh , and found
> > the problem, which might exist only in MDK-8.1. In any case, the line
> > gzip*) CMD='gzip -d -c -q';;
> > needs to be commented out, as (in the context of the rest of the script)
> > it affects both gzipped ordinary files /and/ gzipped tarballs.
>
> RedHat just uses a single `case' statement to filter suffixes. Not very
> fancy. That doesn't look like a suffix, so Mandrake is apparently
> trying to do something else. Anyway, I'm glad to hear you got it
> working.
MDK-8.1 tries first with:
TYPE=`file -L $1 | cut -d' ' -f2-`
...
case $TYPE in
# gzip*) CMD='gzip -d -c -q';;
...
Dave.
--
dle1 at sympatico.ca
-> No son, onanism's a gross orgasm sin, a no-no son. <-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: This is a digitally signed message part
Url : http://tux.oclug.on.ca/pipermail/oclug/attachments/20021003/9c714a17/attachment.bin
More information about the OCLUG
mailing list