Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!ucbvax!ulysses!gsf From: gsf@ulysses.homer.nj.att.com (Glenn Fowler[drew]) Newsgroups: comp.unix.questions Subject: Re: Re^2: Bourne Shell: Variable defined? Summary: ${parameter+word} Message-ID: <11361@ulysses.homer.nj.att.com> Date: 23 Mar 89 05:41:54 GMT References: <1819@umbc3.UMBC.EDU> <9899@smoke.BRL.MIL> <2202@solo1.cs.vu.nl> <1605@fig.bbn.com> Organization: AT&T Bell Laboratories, Murray Hill Lines: 8 # determine if var is set in Bourne-based shells case ${var+1} in 1) echo var set ;; *) echo var not set ;; esac -- Glenn Fowler (201)-582-2195 AT&T Bell Laboratories, Murray Hill, NJ uucp: {att,decvax,ucbvax}!ulysses!gsf internet: gsf@ulysses.att.com