From owner-freebsd-questions@FreeBSD.ORG Thu Oct 14 14:39:17 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97514106564A for ; Thu, 14 Oct 2010 14:39:17 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from mail4.sea5.speakeasy.net (mail4.sea5.speakeasy.net [69.17.117.48]) by mx1.freebsd.org (Postfix) with ESMTP id 715118FC14 for ; Thu, 14 Oct 2010 14:39:17 +0000 (UTC) Received: (qmail 1763 invoked from network); 14 Oct 2010 14:39:16 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail4.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 14 Oct 2010 14:39:16 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id C211B50863; Thu, 14 Oct 2010 10:39:13 -0400 (EDT) From: Lowell Gilbert To: Matthias Apitz References: <20101014083659.GA3150@current.Sisis.de> Date: Thu, 14 Oct 2010 10:39:13 -0400 In-Reply-To: <20101014083659.GA3150@current.Sisis.de> (Matthias Apitz's message of "Thu, 14 Oct 2010 10:36:59 +0200") Message-ID: <44bp6walf2.fsf@be-well.ilk.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org Subject: Re: gzip tries to unpack/pack 1st the filename of $GZIP X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Oct 2010 14:39:17 -0000 Matthias Apitz writes: > 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. You need to fix the syntax on your 'export' lines. Adding a semicolon before the "export" keyword (or moving it to the next line) is the smallest change to do this.