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

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -