[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Test existence of shell variable, bash, csh



"Karsten M. Self" <kmself@ix.netcom.com> writes:

> ...but I'm not aware of a similar bash/korn/bourne feature.  Anyone?

if [ "${VAR:-invalid" = "invalid" ] ; 
        echo "Unset"
fi

?

-- 
Alan Shutko <ats@acm.org> - In a variety of flavors!
Happiness is the greatest good.



Reply to: