Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ames!apple!sun-barr!cs.utexas.edu!uunet!cs.dal.ca!trent From: trent@cs.dal.ca (Trent MacDougall) Newsgroups: comp.sys.att Subject: Re: Forcing /bin/sh in a script under V/386 3.2 Korn shell Message-ID: <1989Jul12.191342.1048@cs.dal.ca> Date: 12 Jul 89 19:13:42 GMT References: <14445@bfmny0.UUCP> Distribution: na Organization: Math, Stats & CS, Dalhousie University, Halifax, NS, Canada Lines: 24 From article <14445@bfmny0.UUCP>, by tneff@bfmny0.UUCP (Tom Neff): > I use Korn shell and am happy with it, but I want certain shell > scripts to be intepreted by the Bourne shell instead. There is > already a mechanism by which CSH(1) figures out to spawn /bin/sh > on a script rather than interpreting itself, namely putting a > colon ':' as the first line. > > What I want to know is, is there any way to do this under K-shell? > I was just going to send Todd Day this note. His postings about setting up C News helped me and I wanted to return the favor. I put the following at the beginning of the file /usr/local/lib/news/bin/config. if [ "$RANDOM" != "$RANDOM" ] then /bin/sh -c "$0 $*"; exit $? fi This will force all shell scripts to be run under sh instead of ksh. -- //_//_//_//_// Trent MacDougall @ Dalhousie University, CS Dept. \\_\\_\\_\\_\\ UUCP {uunet watmath}!dalcs!trent // // // // // INTERNET trent@cs.dal.ca