🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix
Article #276

Re: Shell scripts starting with "#"

#276
From: Scott Blachowicz
Date: Wed, 17 Oct 1990 16:29
23 lines
1550 bytes
>    [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]
But the ":" doesn't work on systems that support "#!". My latest
solution (having recently been forced to work with a "straight"...read
archaic/restrictive... System V system) looks like this:
   #!/bin/sh
   : || exec /bin/sh $0 $argv:q

Regarding Re: Shell scripts starting with "#"; pd@x.co.uk (Paul Davey) writes:
> ...
> Machines that don't recognise #! seem to be fairly rare now though.

Don't know about that...doesn't SCO have a few customers?
--
Scott Blachowicz                E-mail:  scott%grlab.UUCP@hpubvwa.HP.COM
USPS:  Graphicus                 ..or..  ...!hpubvwa!grlab!scott
       150 Lake Str S, #206     VoicePh: 206/828-4691
       Kirkland, WA USA 98033   FAX:     206/828-4236
Technical Details
Message-ID: <2217@megadon.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!altos!megadon!clp
References: <3695@zorba.Tynan.COM> <2136@megadon.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!altos!megadon!clp
From: scott@grlab.UUCP (Scott Blachowicz)
Newsgroups: comp.unix
Subject: Re: Shell scripts starting with "#"
Message-ID: <2217@megadon.UUCP>
Date: 17 Oct 90 16:29:19 GMT
References: <3695@zorba.Tynan.COM> <2136@megadon.UUCP>
Organization: Graphicus, Inc., Kirkland, WA USA
Lines: 23
Approved: clp@megadon.UUCP
Return-Path: <hpubvwa!grlab!news>
In-Reply-To: pd@x.co.uk's message of 10 Oct 90 02:56:35 GMT