From what I've read, setenv
in csh and export
in bash are equivalent. However, I found some strange issues while working with the two.
When I open putty and start typing:
setenv TEMP yes
echo $TEMP //this give me "yes"
then I go to bash and type
echo $TEMP //this give me "yes" as well
However, if I do it in the opposite order, it wouldn't give the same results. Specifically, when I go to bash first and type
export TEMP=no
echo $TEMP //this give me "no"
then I go back to csh and type
echo $TEMP // this give me "Undefined Variable"
Shouldn't it give me "no" as well? Am I missing something?
Thank you!