csh Script Execution (Ch.7)
Several ways to execute a script:
1) /usr/bin/csh script-file
2) chmod u+x script-file, then:
a) make first line a comment, starting with “#”
- (this will make your default shell run the script-file)
b) make first line “#!/usr/bin/csh”
- (this will ensure csh runs the script-file, preferred!)
Useful for debugging your script files:
“#!/usr/bin/csh -x” or “#!/usr/bin/csh -v”