Path: utzoo!attcan!uunet!mailrus!uflorida!mephisto!gatech!dcatla!holos0!lbr From: lbr@holos0.uucp (Len Reed) Newsgroups: comp.unix.xenix Subject: Re: Shell Script question Keywords: shell script Message-ID: <1990Mar21.170124.1365@holos0.uucp> Date: 21 Mar 90 17:01:24 GMT References: <4571@ibmpa.UUCP> Reply-To: lbr@holos0.UUCP (Len Reed) Organization: Holos Software, Inc., Atlanta, GA Lines: 23 In article <4571@ibmpa.UUCP> mcoffey@mcoffey.aix.kingston.ibm.com (Michael Coffey) writes: >I am using XENIX 2.3.1 on an AT clone. I like using the c-shell, and most >of my shell scripts are written for it. I have a bourne shell script that I >would like to use but don't have time to convert it to C-Shell. I thought >having line 1 of the script something like #!/bin/sh >would cause the bourne shell to be used. For some stupid reason SCO never incorporated this convention into either their csh or Bourne shell. It would be nice to tag awk, perl, sed, etc. scripts this way. The SCO csh looks at the first line of a script. If it starts with '#' it's a csh script. Therefore, your "#!/bin/sh" causes this to be run by the csh! I put a single line containing only a colon at the start of each of my Bourne shells scripts, and they run fine out of the csh or Bourne shell. Running a csh script from a Bourne shell is messier. You have to explicitly run the csh, as in "csh script_name". -- Len Reed Holos Software, Inc. Voice: (404) 496-1358 UUCP: ...!gatech!holos0!lbr