Path: utzoo!censor!becker!ziebmef!cks From: cks@ziebmef.uucp (Chris Siebenmann) Newsgroups: comp.sys.att,comp.unix.i386 Subject: Re: Forcing /bin/sh in a script under V/386 3.2 Korn shell Message-ID: <1989Jul11.225839.14835@ziebmef.uucp> Date: 12 Jul 89 02:58:38 GMT References: <14445@bfmny0.UUCP> Organization: Ziebmef Public Access Unix, Toronto, Ontario Lines: 17 In article <14445@bfmny0.UUCP> bfmny0!tneff@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@ziebmef.UUCP or .....!utgpu!{,ontmoh!,ncrcan!brambo!}cks