In message <[EMAIL PROTECTED]>, Eric Blake writes:
>Quotes won't help; the shell then tries to evaluate the command 'unset FOO'
>with no arguments, because there is no reason to do IFS splitting.
Doh.
>But this works, using an intermediate variable, so that IFS splitting still
>occurs:
>$ /bin/sh -c 'foo=a;tmp="unset foo";${foo+$tmp};echo ${foo+set}'; echo $?
>0
>$
Oh, that's neat.
>But why waste the time going through a temporary variable, when you can use:
>test ${foo+set} = set && unset foo
That is clearer, true.
-s