linux - Environment variable is not setting globally -
i using csh
terminal.
.cshrc
setenv $files /home/ec2-user/files
.login
if [ -f ~/.cshrc ]; . ~/.cshrc fi
i trying echo $files values plink. showing error files: undefined variable
you don't use dollar sign when setting variable, use when refer variable.
setenv files /home/ec2-user/files
the test
command should built-in in csh/tcsh implementations, , has of same functionality you'll see listed under man test
.
test -f ~/.cshrc && source ~/.cshrc
note normally, csh/tcsh run .cshrc
or .tcshrc
file automatically, before runs .login
.
Comments
Post a Comment