🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix
Article #286

Re: Shell scripts starting with "#"

#286
From: Peter da Silva
Date: Sat, 20 Oct 1990 18:05
12 lines
792 bytes
So if you do:

	#!/bin/sh
	: || exec /bin/sh $0 $argv:q
	(alias) >/dev/null 2>&1 && exec /bin/sh $0 "$@"

It'll work for the bourne shell, the korn shell, and the c shell, whether
or not you have #! working. Geeze.
-- 
Peter da Silva.   `-_-'
+1 713 274 5180.   'U`
peter@ferranti.com
Technical Details
Message-ID: <2227@megadon.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!know!zaphod.mps.ohio-state.edu!usc!apple!altos!megadon!clp
References: <3695@zorba.Tynan.COM> <2136@megadon.UUCP> <2225@megadon.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!know!zaphod.mps.ohio-state.edu!usc!apple!altos!megadon!clp
From: peter@ficc.ferranti.com (Peter da Silva)
Newsgroups: comp.unix
Subject: Re: Shell scripts starting with "#"
Message-ID: <2227@megadon.UUCP>
Date: 20 Oct 90 18:05:23 GMT
References: <3695@zorba.Tynan.COM> <2136@megadon.UUCP> <2225@megadon.UUCP>
Sender: clp@megadon.UUCP
Reply-To: peter@ficc.ferranti.com (Peter da Silva)
Organization: Xenix Support, FICC
Lines: 12
Approved: clp@megadon.UUCP