Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: notesfiles
Path: utzoo!watmath!clyde!floyd!harpo!seismo!hao!hplabs!hp-pcd!hp-dcd!donn
From: donn@hp-dcd.UUCP
Newsgroups: net.unix
Subject: Re: Re:  Shell programming style -- a pl
Message-ID: <34500004@hp-dcd.UUCP>
Date: Sat, 10-Mar-84 13:32:00 EST
Article-I.D.: hp-dcd.34500004
Posted: Sat Mar 10 13:32:00 1984
Date-Received: Tue, 6-Mar-84 04:11:20 EST
References: <16945@sri-arpa.UUCP>
Organization: Hewlett-Packard Fort Collins Systems Division - Fort Collins, CO
Lines: 19
Nf-ID: #R:sri-arpa:-1694500:hp-dcd:34500004:000:696
Nf-From: hp-dcd!donn    Mar  2 10:32:00 1984

Careful with #!;  If you are running csh on a USG UN*X system
(System III or V), #! doesn't work.  The line #!/bin/sh will then
be seen by csh (after the exec fails), treated as a comment, and
cause csh to assume that it's a csh script (csh assumes that a file
beginning with # is a csh script).  System III and V, but
not V7, sh treat anything after a # as a comment.  The only safe 
form I know of across ALL systems is to write a script that begins
with a space:

 #  This is a /bin/sh script
echo hi there

If you have #!, then Doug's proposal will work.

This applies definitely to 4.1 csh, etc; I havn't tested it against
4.2, but I suspect it still applies.

Donn Terry
hplabs!hp-dcd!donn