I have one script which determine the module load status.
In the following code Line 4, it give me error that it can not load specific version than after I have check the status. Ideally I should get 1 as a status But it was still zero.
Then I have check with command line also. Like module load her/2012;echo $status
.
I could not understand why am I getting status code 0. More specific to issue, how can I determine the status of module load command
1 #!/bin/csh -fe
2 source /global/etc/csh.cshrc
3 module unload hercules
4 module load hercules/2012
5 if ( $status != 0) then
6 echo "Error: abhishek Unable to execute module load hercules/2012"
7 exit
8 endif