help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] How to tell if an environment variable exists or not


From: Chet Ramey
Subject: Re: [Help-bash] How to tell if an environment variable exists or not
Date: Wed, 07 Mar 2012 21:48:15 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2

On 3/7/12 9:35 AM, Stefano Lattarini wrote:

>> Both those flags also behave unexpectedly and non-portably in a
>> number of situations, like in subshells, nesting of compound
>> commands, functions...
>>
> True for "set -e"; I don't see how this can be a problem with "set -u".

Keep in mind that Posix has changed the definition of how -u applies
at least once (with respect to expanding $@ and $* when there are no
positional parameters).  Maybe that's what he meant, though I agree
that set -e applies more in the scenarios he mentioned above.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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