Date: Sun, 25 Feb 2001 19:44:42 +0100
From: Andreas Klemm <andreas@FreeBSD.org>
To: "Brandon S. Allbery KF8NH" <allbery@ece.cmu.edu>
Cc: stable@FreeBSD.ORG, apsfilter-devel@apsfilter.org, =?iso-8859-1?Q?Michael_Lo=DFin?= <phallobst@web.de>
Subject: Re: Brokenness: : ${TMPDIR:-/tmp} results in empty TMPDIR variable
Message-ID: <20010225194442.A15290@titan.klemm.gtn.com>
In-Reply-To: <98700000.983125443@pyanfar.ece.cmu.edu>; from allbery@ece.cmu.edu on Sun, Feb 25, 2001 at 01:24:03PM -0500
References: <20010225134311.A25603@titan.klemm.gtn.com> <98700000.983125443@pyanfar.ece.cmu.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
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
> <andreas@FreeBSD.ORG> wrote:
> +-----
> | Another -STABLE problem:
> |
> | : ${TMPDIR:-/tmp}
> |
> | The variable stays empty.
> +--->8
>
> It should; the correct idiom is
>
> : ${TMPDIR:=/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:=word}
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 expansion
of word is substituted; otherwise, the value of parameter is sub-
stituted.
${parameter:=word}
Assign Default Values. If parameter is unset or null, the expan-
sion of word is assigned to parameter. In all cases, the final
value of parameter is substituted. Only variables, not position-
al parameters or special parameters, can be assigned in this way.
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 ///
--
Andreas Klemm - Powered by FreeBSD 4.2 SMP
Need a magic printfilter today ? -> http://www.apsfilter.org/
[-- Attachment #2 --]
-----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-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010225194442.A15290>
