Tuesday, July 01, 2014

Variable syntax: cshell is picky. Use braces to refer to variables

If cshell (csh) is your default shell after you login ~/.cshrc will be parsed. If you get the error "variable syntax" your next step if to figure out what shell config file is declaring a variable incorrectly. The below is correct:
# braces are needed to avoid "variable syntax" error
setenv PATH $PATH:/usr/sbin:${GVHOME}/bin:/opt/csw/bin:/usr/sfw/bin:/usr/local/bin
Just remove the braces and you will end up with the "variable syntax" error.

No comments:

Followers