what shell do I have? job-control

Chris Lewis clewis at ferret.ocunix.on.ca
Thu Apr 18 10:58:59 AEST 1991


In article <1456 at irit.irit.fr> pfeiffer at irit.fr (Daniel Pfeiffer) writes:

>Actually I don't know what shell I have.  It is about the same under
>EPIX and SunOS except that the former allows echo -n only when called
>as sh -B, which breaks scripts on other machines, since that's not a
>standard option.  And the latter doesn't at all accept echo \c -- talk
>about standards!  On neither machine the manual gives credit to the
>author(s).  It looks quite Bournish and it's called /bin/sh.  But it
>has (like Korn shell I believe) [ test ] as a builtin though the below
>neat syntax won't work.  There is also a nifty new getopts builtin.

They're both Bourne shells.  "echo -n" is a BSD-istic echo, hence it's
preference on SunOS, and echo "\c" is an SV-istic echo.  "[ test ]"
is a builtin in most Bourne shells nowadays.  "echo" is a builtin
in many Bourne shells now too.  On recent versions of SunOS there is
a complete suite of System V compatibility features, /bin/sh5 etc.

Ksh can be identified by seeing if there's a "$RANDOM" variable defined
and that it changes each time you reference it.

The ability to do shell functions is in the "current" Bourne shell
and doesn't indicate that the shell is ksh.

>And of course there's job control.  Actually again and again I hear
>that this is an invention of C shell, but as recently as last year in
>spring I still had a csh w/o this.  It would seem to me that this is
>an old (at least 6 years) feature which was then known as layered
>shell (lsh).  On my machine at the time this was supposed to allow you
>to switch processes and only that so you'd have to have a shell
>running under this.  Alas, at the time this was broken, and since this
>seems to have disappeared, so I've never seen this run.

Few System V versions of UNIX have job control in their csh's because
the kernel support for it is (was) a BSD-only-ism and rarely present.
-- 
Chris Lewis, Phone: (613) 832-0541, Internet: clewis at ferret.ocunix.on.ca
UUCP: uunet!mitel!cunews!latour!ecicrl!clewis; Ferret Mailing List:
ferret-request at eci386; Psroff (not Adobe Transcript) enquiries:
psroff-request at eci386 or Canada 416-832-0541.  Psroff 3.0 in c.s.u soon!



More information about the Comp.unix.shell mailing list