I just upgraded to Lion and I am using bash for the first time (my previous experience is with csh and tcsh). I have encountered unexpected behavior. A simple example is:
I create a file containing the following commands:
echo PATH BEFORE is $PATH PATH=/usr/local/fortran:$PATH export PATH echo PATH AFTER is $PATHI open a terminal (in bash) and execute the file shown above. It echoes the expected result:
PATH BEFORE is /usr/bin: ... PATH AFTER is /usr/local/fortran:/usr/bin ...I then type:
echo $PATHand
/usr/local/fortranis NOT part of the path. I assumed that the export command would make the PATH sticky. Can someone explain why this is not happening?