Shell scripts starting with "#"
Dan Farmer
df at sei.cmu.edu
Sat Jul 14 07:13:42 AEST 1990
[Moderators Note:-
To save a deluge of mail and postings, the answer is to
put a ':' by itself on line one of the script. For example;
:
# This is the second line of a bourne-shell script.
This may not work on absolutely *every* variant, but it should cover most.
- Der]
Does System V (or some versions of Sys V, or any version of the Un*x,
for that matter) execute a shell script under csh if it begins with a
"#" (for instance if you explicitly say "#!/bin/sh")? I've been told
this, but can't confirm it....
If this is true, what is the best portable way to always have a script
execute under /bin/sh? (don't say "/bin/sh script"....)
thanks,
- dan
df at sei.cmu.edu
More information about the Comp.unix
mailing list