Testing for undefined variables
Eric M. Boehm
emb978 at leah.Albany.Edu
Wed Apr 6 10:35:23 AEST 1988
Is there any way to test for an undefined variable? I have a variable defined
in my .login. If I invoke another shell interactively, there is no problem.
However, if I invoke a shell when I am not online (usually with "at") I run
into problems. An alias in .cshrc refers to the variable from .login. I
cannot find any reference to a command such as:
if X is undefined then ...
Right now I am preventing .cshrc from referencing this variable. I don't like
setting it to a null value as that will cause problems when I invoke a
subshell interactively.
Please e-mail responses. Thanks in advance for any help.
Eric M. Boehm
EMB978 at ALBNY1VX.BITNET
EMB978 at LEAH.ALBANY.EDU
More information about the Comp.unix.questions
mailing list