Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!hp4nl!botter!star.cs.vu.nl!maart From: maart@cs.vu.nl (Maarten Litmaath) Newsgroups: comp.unix.questions Subject: Re^4: Bourne Shell: Variable defined? Summary: use && and || operators Message-ID: <2209@solo2.cs.vu.nl> Date: 23 Mar 89 12:47:15 GMT References: <1819@umbc3.UMBC.EDU> <9899@smoke.BRL.MIL> <2202@solo1.cs.vu.nl> <1605@fig.bbn.com> <16505@mimsy.UUCP> Organization: V.U. Informatica, Amsterdam, the Netherlands Lines: 14 chris@mimsy.UUCP (Chris Torek) writes: \ if [ "${vax+X}" ]; then echo is set; else echo not set; fi ^ ^ not needed [ ${foo+bar} ] && echo core || echo dumped (In the mythical True C Shell one can say: echo $?foo ? core : dumped ) -- Modeless editors and strong typing: |Maarten Litmaath @ VU Amsterdam: both for people with weak memories. |maart@cs.vu.nl, mcvax!botter!maart