Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site genrad.UUCP
Path: utzoo!watmath!clyde!floyd!harpo!decvax!genrad!john
From: john@genrad.UUCP (John Nelson)
Newsgroups: net.unix
Subject: Re:  Shell programming style -- a plea for better shell scripts
Message-ID: <3880@genrad.UUCP>
Date: Fri, 2-Mar-84 09:54:52 EST
Article-I.D.: genrad.3880
Posted: Fri Mar  2 09:54:52 1984
Date-Received: Sat, 3-Mar-84 23:44:38 EST
References: <16948@sri-arpa.UUCP>
Organization: GenRad, Bolton, Mass.
Lines: 14

>  #!/bin/sh

>  will be treated as a comment by the Bourne shell, so its presence
>  cannot possibly hurt.

Excuse me, but while it may be true that the Bourne shell will treat that
line as a comment, any csh running on a system that does not have the
"#!" magic number built into the kernal exec will attempt to run that
script as a csh script.

Csh first attempts to exec a command.  If that fails, it examines the first
character of the file.  If it is a "#", then it runs it as a csh script,
otherwise, it runs it as an sh script.  That line will do precisely the
wrong thing on such a system (like my 68000 unisoft system III).