"#! /bin/sh" vs ":"

Joel M. Miller jmm at ski.UUCP
Sat Apr 27 15:55:46 AEST 1985


There are at least 2 ways of indicating to csh that a Shell script
should be interpreted by sh: begin the file with:

	#! /bin/sh

or with any character other than "#", such as:

	:

These two ways are not equivalent, but I can't characterize the
difference.  The first sometimes causes commands in the script
to fail with the error message "restricted", and produces a funny
command line in ps -f:

	file file

These are cured by ":".

But what's really happening here?
-- 
Joel M Miller; Smith-Kettlewell Institute of Visual Sciences
2232 Webster St; San Francisco CA 94115; 415/561-1703
dual!ptsfa!ski!jmm    OR    {ucbvax,dual,sun}!twg!ski!jmm



More information about the Comp.unix.wizards mailing list