Re^4: Bourne Shell: Variable defined?

Maarten Litmaath maart at cs.vu.nl
Thu Mar 23 22:47:15 AEST 1989


chris at 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 at cs.vu.nl, mcvax!botter!maart



More information about the Comp.unix.questions mailing list