Path: utzoo!mnetor!uunet!husc6!uwvax!oddjob!ncar!boulder!sunybcs!bingvaxu!leah!emb978 From: emb978@leah.Albany.Edu (Eric M. Boehm) Newsgroups: comp.unix.questions Subject: Testing for undefined variables Message-ID: <677@leah.Albany.Edu> Date: 6 Apr 88 00:35:23 GMT Organization: The University at Albany, Computer Services Center Lines: 18 Keywords: Environment Variables C Shell BSD 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@ALBNY1VX.BITNET EMB978@LEAH.ALBANY.EDU