bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unset FOO


From: Eric Blake
Subject: Re: unset FOO
Date: Wed, 15 Oct 2008 06:50:10 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.17) Gecko/20080914 Thunderbird/2.0.0.17 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Eric Blake on 10/14/2008 10:21 AM:
> But why waste the time going through a temporary variable, when you can use:
> 
> test ${foo+set} = set && unset foo

To avoid syntax errors from test, this needs better quoting, as in either:

test x${foo+set} = xset && unset foo
test "${foo+set}" = set && unset foo

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkj15wIACgkQ84KuGfSFAYDQ/gCgg/ge3/olTe5Lz8KP8MnFUMpW
EXsAoMu7XqezJR7pAJ00pAPT0cyyfiHJ
=g+ID
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]