From owner-freebsd-stable Sun Feb 25 10:45:46 2001 Delivered-To: freebsd-stable@freebsd.org Received: from klemm.gtn.com (pppak04.gtn.com [194.77.111.199]) by hub.freebsd.org (Postfix) with SMTP id D568B37B491 for ; Sun, 25 Feb 2001 10:45:37 -0800 (PST) (envelope-from andreas@klemm.gtn.com) Received: (from andreas@localhost) by klemm.gtn.com (8.11.2/8.11.2) id f1PIigf15435; Sun, 25 Feb 2001 19:44:42 +0100 (CET) (envelope-from andreas) Date: Sun, 25 Feb 2001 19:44:42 +0100 From: Andreas Klemm To: "Brandon S. Allbery KF8NH" Cc: stable@FreeBSD.ORG, apsfilter-devel@apsfilter.org, =?iso-8859-1?Q?Michael_Lo=DFin?= Subject: Re: Brokenness: : ${TMPDIR:-/tmp} results in empty TMPDIR variable Message-ID: <20010225194442.A15290@titan.klemm.gtn.com> References: <20010225134311.A25603@titan.klemm.gtn.com> <98700000.983125443@pyanfar.ece.cmu.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="3V7upXqbjpZ4EhLz" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <98700000.983125443@pyanfar.ece.cmu.edu>; from allbery@ece.cmu.edu on Sun, Feb 25, 2001 at 01:24:03PM -0500 X-Operating-System: FreeBSD 4.2-STABLE SMP X-Disclaimer: A free society is one where it is safe to be unpopular Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --3V7upXqbjpZ4EhLz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 25, 2001 at 01:24:03PM -0500, Brandon S. Allbery KF8NH wrote: > On Sunday, February 25, 2001 13:43:11 +0100, Andreas Klemm=20 > wrote: > +----- > | Another -STABLE problem: > | > | : ${TMPDIR:-/tmp} > | > | The variable stays empty. > +--->8 >=20 > It should; the correct idiom is >=20 > : ${TMPDIR:=3D/tmp} I don't understand that, why :- doesn't work.... Well the bash manpage for example states: ${parameter:-word} Use Default Values. If parameter is unset or null, the expansion of word is substituted. Otherwise, the value of parameter is substituted. ${parameter:=3Dword} Assign Default Values. If parameter is unset or null, the expansion of word is assigned to parame- ter. The value of parameter is then substituted. Positional parameters and special parameters may not be assigned to in this way. And our shells manpage states: ${parameter:-word} Use Default Values. If parameter is unset or null, the expans= ion of word is substituted; otherwise, the value of parameter is s= ub- stituted. ${parameter:=3Dword} Assign Default Values. If parameter is unset or null, the exp= an- sion of word is assigned to parameter. In all cases, the final value of parameter is substituted. Only variables, not positi= on- al parameters or special parameters, can be assigned in this w= ay. Since TMPDIR isn't set, it should be substituted by the default.. And this doesn't work and I think this is not correct. It seems to work this way on other people machines. Michael, what do you say ??? Andreas /// --=20 Andreas Klemm - Powered by FreeBSD 4.2 SMP Need a magic printfilter today ? -> http://www.apsfilter.org/ --3V7upXqbjpZ4EhLz Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (FreeBSD) Comment: Weitere Infos: siehe http://www.gnupg.org iD8DBQE6mVKZd3o+lGxvbLoRAiRHAJ0YaEBMQanX+ABDDr48cPcGMNAtuQCglDJX llFU1zMmfGH8UYN5V9NcGhk= =rsYb -----END PGP SIGNATURE----- --3V7upXqbjpZ4EhLz-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message