On Fri, Oct 20, 2000 at 06:58:36PM +0200, Lars J. Aas wrote:
: Anyways, what would be really cool is to find a LHS expansion that would
: either expand to "set" or to "unset" depending on whether the variable was
: set or not. I haven't been able to think of one, though. Does anyone
: know it that could be done?
:
: This trick is kind of cool, but it's the inverse of what I originally
: looked for:
:
: if test ${VAR+un}set != unset; then
: # VAR is set
: fi
:
: and
:
: if test ${VAR+un}set != set; then
: # VAR is unset
: fi
I'm rambling - it doesn't work... This works, though, I think :-/
if test not_${VAR+un}set = not_unset; then
# $VAR is set
fi
Lars J
- Various systems (was: Success... Akim Demaille
- Re: Various systems (was: Suc... David Morgan
- Re: Various systems (was: Suc... Akim Demaille
- Re: Various systems (was: Suc... David Morgan
- Re: Various systems (was: Suc... Akim Demaille
- Re: Success (mostly) with the testsuite Akim Demaille
- Re: Success (mostly) with the testsuit... Akim Demaille
- Re: Success (mostly) with the tes... David Morgan
- RE: Success (mostly) with the testsuite Bernard Dautrevaux
- Re: Success (mostly) with the testsuite Lars J. Aas
- Re: Success (mostly) with the testsuite Lars J. Aas
- Re: Success (mostly) with the testsuite Akim Demaille
- Re: Success (mostly) with the testsuite David Morgan
- Re: Success (mostly) with the testsuite Akim Demaille
- Re: Success (mostly) with the testsuite Alexandre Oliva
- Re: Success (mostly) with the testsuite Alexandre Oliva
- Re: Success (mostly) with the testsuite Akim Demaille
- Re: Success (mostly) with the testsuite Alexandre Oliva
- Re: Success (mostly) with the testsuite Akim Demaille
- Re: Success (mostly) with the testsuite Akim Demaille
- Re: Success (mostly) with the testsuite David Morgan
