Bourne Shell: Variable defined?

Wm. E. Davidsen Jr davidsen at steinmetz.ge.com
Wed Mar 29 08:11:29 AEST 1989


I've been following this, and I'm not sure the right answer has come
out. The construct is ${foo+X} okay, but I think you want
	[ -z "${foo+X}" ] && echo "foo set" || echo "foo not set"
construction, because without the -z some funny things seem to happen on
older (V7/Sys III) shells. Just a thought.
-- 
	bill davidsen		(wedu at crd.GE.COM)
  {uunet | philabs}!steinmetz!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me



More information about the Comp.unix.questions mailing list