Forcing /bin/sh in a script under V/386 3.2 Korn shell
Chris Siebenmann
cks at ziebmef.uucp
Wed Jul 12 12:58:38 AEST 1989
In article <14445 at bfmny0.UUCP> bfmny0!tneff at uunet.UU.NET (Tom Neff) writes:
| I use Korn shell and am happy with it, but I want certain shell
| scripts to be intepreted by the Bourne shell instead.
On a BSD Unix, one could put "#! /bin/sh" at the start of your script
and it would work. Unfortunately, System V doesn't have this (and
worse yet, your vendor has gratuitusly hacked csh so many scripts will
break under it), so the best substitute (swiped from Perl v2's
Configure script) is:
(alias) >/dev/null 2>&1 && (exec /bin/sh $0 ${1+"$@"})
--
"Oh BLESS you, sir! The ANGEL OF DEATH was after me just as SURE as
you're standing there, yes he WAS!"
Chris Siebenmann uunet!{utgpu!moore,attcan!telly}!ziebmef!cks
cks at ziebmef.UUCP or .....!utgpu!{,ontmoh!,ncrcan!brambo!}cks
More information about the Comp.sys.att
mailing list