Difference between source and ./ execution of linux scripts
csh: set a=0 echo "a is $a" when i do ./my_script.csh output is: a is when i do source my_script.csh output is: a is 0 Why is it so . As i know that ./ execution uses new shell. Michał Šrajer check if variable "a" is set in your current shell: set | grep '^a=' Remember that once you source script to your current shell, all it's global variables are there until unset or you exit the current shell. You may want to start a new shell, source the script, end exit shell to perform valid tests. I don't know the context of your problem, but you may want to export some key variables to have their