Re^2: Bourne Shell: Variable defined?

Glenn Fowler[drew] gsf at ulysses.homer.nj.att.com
Thu Mar 23 15:41:54 AEST 1989


# 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 at ulysses.att.com



More information about the Comp.unix.questions mailing list