Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!crdgw1!uakari.primate.wisc.edu!samsung!noose.ecn.purdue.edu!gus16.ecn.purdue.edu!luj From: luj@gus16.ecn.purdue.edu (Jun Lu) Newsgroups: comp.unix.shell Subject: Re: signature of the Bourne shell and the C shell Keywords: sh, csh Message-ID: <1991Feb24.203704.28932@noose.ecn.purdue.edu> Date: 24 Feb 91 20:37:04 GMT References: <3596@gmuvax2.gmu.edu> Sender: root@noose.ecn.purdue.edu (ECN System Management) Organization: Purdue University School of Aeronautics and Astronautics Lines: 22 In article <3596@gmuvax2.gmu.edu> xwang@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/ 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@ecn.purdue.edu -- -- Aeronautics & Astronautics Bitnet: luj%ecn.purdue.edu@purccvm -- -- Purdue University UUCP: pur-ee!luj -- -- W. Lafayette, IN 47907 Phone:317-494-9410 Fax:317-494-0307 -- Brought to you by Super Global Mega Corp .com