gzip tries to unpack/pack 1st the filename of $GZIP

Matthias Apitz guru at unixarea.de
Thu Oct 14 08:37:03 UTC 2010


Hello,

I was facing a problem in some Makefile/shell-scripting and finally I
could nail it down:

when you set the environment variable GZIP to something, for example to
let it point to gzip itself, it tries 1st to unpack this file:

$ GZIP=/usr/bin/gzip export GZIP
$ $GZIP -dc source.tar.gz | wc -l
gzip: /usr/bin/gzip: not in gzip format
  645770

o

$ GZIP=bla export GZIP
$ gzip -dc source.tar.gz | wc -l
gzip: can't stat: bla: No such file or directory
  645770

Why is this? It's not mentioned in the man page.
Thanks

	matthias
-- 
Matthias Apitz
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e <guru at unixarea.de> - w http://www.unixarea.de/


More information about the freebsd-questions mailing list