re: tcsh thinks the / following the colon in
echo "export PATH=$PATH:/p/course/cs400/public/scripts/" >> ~/.bashrc
~~~~~~^
is a modifier, and it complains because / isn't a valid
modifier (a csh modifier is usually a single letter). Apparently this is
not what we mean by "$PATH:/" so, a few ways to make this
line work in tcsh (also work in bash/zsh):
Protect PATH from the colon with braces:
echo "export PATH=${PATH}:/p/course/cs400/public/scripts/" >> ~/.bashrcQuote $PATH separately from the colon:
echo "export PATH=$PATH":/p/course/cs400/public/scripts/ >> ~/.bashrcThough in all honesty, we should just disable variable interpolation altogether with single quotes...
echo 'export PATH="$PATH":/p/course/cs400/public/scripts/' >> ~/.bashrc
P.S. tcsh is probably not going to look at ~/.bashrc. So
unless you change your login
shell to bash (chances are you want this), you probably
want to consider changing ~/.bashrc in that command to
something like ~/.cshrc or ~/.tcshrc (review
the FILES section of man tcsh).
P.P.S. Also, export doesn't exist in csh/tcsh. You want
setenv,
e.g. setenv PATH ${PATH}:/p/course/cs400/public/scripts/.
csh is quite different from Bash and other Bourne-like shells! (But then
again you can switch to Bash since that's what they teach here...)