Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!steinmetz!davidsen From: davidsen@steinmetz.ge.com (Wm. E. Davidsen Jr) Newsgroups: comp.unix.questions Subject: Re: Bourne Shell: Variable defined? Keywords: Bourne shell, elementary question Message-ID: <13473@steinmetz.ge.com> Date: 28 Mar 89 22:11:29 GMT References: <1819@umbc3.UMBC.EDU> <25130@hqda-ai.UUCP> Reply-To: davidsen@crdos1.UUCP (bill davidsen) Organization: General Electric CRD, Schenectady, NY Lines: 9 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@crd.GE.COM) {uunet | philabs}!steinmetz!crdos1!davidsen "Stupidity, like virtue, is its own reward" -me