Skip site navigation (1)Skip section navigation (2)
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

--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
> <andreas@FreeBSD.ORG> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010225194442.A15290>