On Fri, Oct 20, 2000 at 06:22:04PM +0200, Bernard Dautrevaux wrote: : > test s${CONFIG_FILES+et} = set || CONFIG_FILES=$config_files : : Hi all, : : I usually use the following construct, to protect against any kind of value : for FOO, be it empty or starting with a special character: : : test X"${FOO+set}" = X"set" || FOO=$foo I can appreciate having fixed conventions for things like this, and I usually do quote on both sides of the =. 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 Lars J
- Re: Success (mostly) with the... Akim Demaille
- 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