Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1+some 2/3/84; site dual.UUCP Path: utzoo!watmath!clyde!burl!we13!ihnp4!dual!fair From: fair@dual.UUCP (Erik E. Fair) Newsgroups: net.unix Subject: Re: #! in shell scripts Message-ID: <326@dual.UUCP> Date: Mon, 5-Mar-84 21:41:19 EST Article-I.D.: dual.326 Posted: Mon Mar 5 21:41:19 1984 Date-Received: Tue, 6-Mar-84 06:54:45 EST References: <16948@sri-arpa.UUCP> <3880@genrad.UUCP> Organization: Dual Systems, Berkeley, CA Lines: 21 I have it on good authority that the #! kernel hack for making shell scripts directly executable is a 32Vism. Since 4BSD is a 32V derivative, it has it. Since System III and V are not 32V derivatives, they don't. For the users of 4BSD systems: If you want to write Bourne Shell scripts, go ahead. But if you ever have the notion to port them to USG Systems, or V7 Systems, your scripts will fail for all users of csh, which assumes that a shell script with `#' at the beginning is a csh script, and not a sh script. Better that you do something like this: : This comment line will do the right thing for all versions of UNIX, : if you like Bourne Shell Scripts. PATH=/foo/bar:/snafu/bin:/etc:; export PATH and so on, ad nauseum. Erik E. Fair dual!fair@BERKELEY.ARPA {ihnp4,ucbvax,cbosgd,decwrl,amd70,fortune,zehntel}!dual!fair Dual Systems Corporation, Berkeley, California