Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!usenet.ins.cwru.edu!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.unix.questions Subject: Re: Executing a script with a specific shell. Message-ID: <1990Jan5.231135.26178@virtech.uucp> Date: 5 Jan 90 23:11:35 GMT References: <1483@lakesys.lakesys.com> <1989Dec30.122215.2199@virtech.uucp> <458@everex.UUCP> Distribution: usa Organization: Virtual Technologies Inc. Lines: 30 In article <458@everex.UUCP>, jde@everex.UUCP (-Jeff Ellis) writes: > In article <1989Dec30.122215.2199@virtech.uucp> cpcahil@virtech.uucp (Conor P. Cahill) writes: > >Place a: > > #!/bin/sh > >as the first line of the shell file. This always works under BSD unix and > >if your primary shell is the csh it will work under system V. > > Well is the AT&T SYSV.3.2 systems I have tried that will NOT work. > As per the manual it says that when using csh if the first char in the first > line of a script file is a "#" then csh thinks it will be a csh script. I'm not sure about ESIX, but it sounds like there is a bug there. In 386/ix the csh will interpret the #! correctly. The following shell will produce the indicated output: % cat t.sh #!/bin/echo hello VAR=test echo $VAR % t.sh hello t.sh % So /bin/echo was run with hello and the name of the shell as arguments. -- +-----------------------------------------------------------------------+ | Conor P. Cahill uunet!virtech!cpcahil 703-430-9247 ! | Virtual Technologies Inc., P. O. Box 876, Sterling, VA 22170 | +-----------------------------------------------------------------------+