signature of the Bourne shell and the C shell

Jun Lu luj at gus16.ecn.purdue.edu
Mon Feb 25 07:37:04 AEST 1991


In article <3596 at gmuvax2.gmu.edu> xwang at gmuvax2.gmu.edu (Xiang-Min Wang) writes:
>I am writing a shell script in which I want, among other things, to have
>the capability of testing first the system is the Bourne shell or the C
>shell. Right now, I am using some system shell variables to do that. 

Why do you want to know that ? You can take the _control_ by telling the
system which shell you want it to use to interprete your shell script.
You can start your shell script with its first line being someting
like this:

#! /bin/<your_favortie_shell>

For more info, see execve(2)

BTW, both sh and csh are "essential utilities" and come with almost with
every "standard" unix.  If you miss either one, call your vendor.

--
-- Jun Lu                          Internet:luj at ecn.purdue.edu          --
-- Aeronautics & Astronautics      Bitnet:  luj%ecn.purdue.edu at purccvm  --
-- Purdue University               UUCP:    pur-ee!luj                  -- 
-- W. Lafayette, IN 47907          Phone:317-494-9410  Fax:317-494-0307 --



More information about the Comp.unix.shell mailing list