From owner-freebsd-questions@FreeBSD.ORG Thu Oct 14 15:29:11 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 14CD1106566B for ; Thu, 14 Oct 2010 15:29:11 +0000 (UTC) (envelope-from srandall52@gmail.com) Received: from mail-gy0-f172.google.com (mail-gy0-f172.google.com [209.85.160.172]) by mx1.freebsd.org (Postfix) with ESMTP id BF5958FC18 for ; Thu, 14 Oct 2010 15:29:10 +0000 (UTC) Received: by gyc15 with SMTP id 15so2459587gyc.17 for ; Thu, 14 Oct 2010 08:29:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type:content-transfer-encoding; bh=/cOX91RWowKs5ZARIxeFvy0qMDrYWvzZHvxQYCxPo5I=; b=IXUcCrSiaDx9gYqE762YOX60rhxLcevxr8Uc7wkM49vl0jYP5SIGoJADCw3HcJQaMp KAs5AmkmKGWlSF4NEH9tlkAtoRMgmtSAbYRkFL2UFMpe31uUPd99FWg4x4et+0A2Wfmw 6P4nnP9WxUcacst/xREUTuItK70sK790aDUBE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; b=Rfyp7cRAQvyWYtqlP61Z/il2TJEgneEZzzvUHiX0B6VVGUlyWNrE/Vh+nhX70TWABf zjxnX1HFjOaR4YFWjysk4lcX5LwLCRTwAY/0zGHUbWa+moNwiy4EIvXCvu/MaZQ5lRG4 BIzAFtrXKe7Uy0cNkEsx6Szq20El4prYNz9+Q= Received: by 10.42.74.137 with SMTP id w9mr6231321icj.201.1287068254236; Thu, 14 Oct 2010 07:57:34 -0700 (PDT) Received: from locust.local ([75.27.226.64]) by mx.google.com with ESMTPS id r6sm27738yba.11.2010.10.14.07.57.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 14 Oct 2010 07:57:32 -0700 (PDT) Date: Thu, 14 Oct 2010 09:57:30 -0500 From: Steve Randall To: Matthias Apitz Message-ID: <20101014095730.4cb51698@locust.local> In-Reply-To: <20101014083659.GA3150@current.Sisis.de> References: <20101014083659.GA3150@current.Sisis.de> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; i386-portbld-freebsd8.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 15:29:11 -0000 On Thu, 14 Oct 2010 10:36:59 +0200 Matthias Apitz wrote: > > 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. It is, actually. ENVIRONMENT If the environment variable GZIP is set, it is parsed as a white-space separated list of options handled before any options on the command line.