1

I have some legacy csh code that is having issues and I think the issue is related to unset environment variables that need to be set but aren't being set.

Does csh have the Bash feature set -o nounset?

I ask because I thought to myself "csh has set echo which is like Bash's set -o xtrace and so maybe csh also has the other Bash feature set -o nounset".

1

As Stéphane answered in the comments:

That's the default in csh!

To add a reference point, the csh manpage says, under Variable substitution:

...

Except as noted, it is an error to reference a variable which is not set.

...

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.