<s>
The	B-Device
Bourne	I-Device
shell	I-Device
(	O
sh	O
)	O
is	O
a	O
shell	B-Application
command-line	O
interpreter	O
for	O
computer	B-General_Concept
operating	I-General_Concept
systems	I-General_Concept
.	O
</s>
<s>
The	B-Device
Bourne	I-Device
shell	I-Device
was	O
the	O
default	O
shell	B-Application
for	O
Version	B-Operating_System
7	I-Operating_System
Unix	I-Operating_System
.	O
</s>
<s>
Unix-like	B-Operating_System
systems	I-Operating_System
continue	O
to	O
have	O
/bin/sh	B-Device
—	O
which	O
will	O
be	O
the	B-Device
Bourne	I-Device
shell	I-Device
,	O
or	O
a	O
symbolic	B-Application
link	I-Application
or	O
hard	B-Application
link	I-Application
to	O
a	O
compatible	O
shell	B-Application
—	O
even	O
when	O
other	O
shells	O
are	O
used	O
by	O
most	O
users	O
.	O
</s>
<s>
Developed	O
by	O
Stephen	O
Bourne	O
at	O
Bell	O
Labs	O
,	O
it	O
was	O
a	O
replacement	O
for	O
the	O
Thompson	B-Application
shell	I-Application
,	O
whose	O
executable	O
file	O
had	O
the	O
same	O
name	O
—	O
sh	O
.	O
</s>
<s>
It	O
was	O
released	O
in	O
1979	O
in	O
the	O
Version	B-Operating_System
7	I-Operating_System
Unix	I-Operating_System
release	O
distributed	O
to	O
colleges	O
and	O
universities	O
.	O
</s>
<s>
Although	O
it	O
is	O
used	O
as	O
an	O
interactive	O
command	O
interpreter	O
,	O
it	O
was	O
also	O
intended	O
as	O
a	O
scripting	B-Language
language	I-Language
and	O
contains	O
most	O
of	O
the	O
features	O
that	O
are	O
commonly	O
considered	O
to	O
produce	O
structured	O
programs	O
.	O
</s>
<s>
It	O
gained	O
popularity	O
with	O
the	O
publication	O
of	O
The	O
Unix	B-Application
Programming	O
Environment	O
by	O
Brian	O
Kernighan	O
and	O
Rob	O
Pike	O
—	O
the	O
first	O
commercially	O
published	O
book	O
that	O
presented	O
the	O
shell	B-Application
as	O
a	O
programming	O
language	O
in	O
a	O
tutorial	O
form	O
.	O
</s>
<s>
Work	O
on	O
the	B-Device
Bourne	I-Device
shell	I-Device
initially	O
started	O
in	O
1976	O
.	O
</s>
<s>
First	O
appearing	O
in	O
Version	B-Operating_System
7	I-Operating_System
Unix	I-Operating_System
,	O
the	B-Device
Bourne	I-Device
shell	I-Device
superseded	O
the	O
Mashey	B-Application
shell	I-Application
.	O
</s>
<s>
Some	O
of	O
the	O
primary	O
goals	O
of	O
the	O
shell	B-Application
were	O
:	O
</s>
<s>
To	O
allow	O
shell	B-Language
scripts	I-Language
to	O
be	O
used	O
as	O
filters	B-Application
.	O
</s>
<s>
Control	O
over	O
all	O
input/output	O
file	B-Application
descriptors	I-Application
.	O
</s>
<s>
Control	O
over	O
signal	B-General_Concept
handling	I-General_Concept
within	O
scripts	O
.	O
</s>
<s>
No	O
limits	O
on	O
string	O
lengths	O
when	O
interpreting	O
shell	B-Language
scripts	I-Language
.	O
</s>
<s>
This	O
allowed	O
context	O
to	O
be	O
established	O
at	O
startup	O
and	O
provided	O
a	O
way	O
for	O
shell	B-Language
scripts	I-Language
to	O
pass	O
context	O
to	O
sub	O
scripts	O
(	O
processes	B-Operating_System
)	O
without	O
having	O
to	O
use	O
explicit	O
positional	O
parameters	O
.	O
</s>
<s>
Features	O
of	O
the	O
Version	B-Operating_System
7	I-Operating_System
UNIX	I-Operating_System
Bourne	B-Device
shell	I-Device
include	O
:	O
</s>
<s>
Command	B-Device
substitution	I-Device
using	O
backquotes	O
:	O
`command`	O
.	O
</s>
<s>
case	O
~	O
in	O
~	O
esac	O
selection	O
mechanism	O
,	O
primarily	O
intended	O
to	O
assist	O
argument	B-Language
parsing	I-Language
.	O
</s>
<s>
Contains	O
strong	O
provisions	O
for	O
controlling	O
input	O
and	O
output	O
and	O
in	O
its	O
expression	B-Language
matching	I-Language
facilities	O
.	O
</s>
<s>
The	B-Device
Bourne	I-Device
shell	I-Device
also	O
was	O
the	O
first	O
to	O
feature	O
the	O
convention	O
of	O
using	O
file	B-Application
descriptor	I-Application
2>	O
for	O
error	B-Error_Name
messages	I-Error_Name
,	O
allowing	O
much	O
greater	O
programmatic	O
control	O
during	O
scripting	O
by	O
keeping	O
error	B-Error_Name
messages	I-Error_Name
separate	O
from	O
data	O
.	O
</s>
<s>
Stephen	O
Bourne	O
's	O
coding	O
style	O
was	O
influenced	O
by	O
his	O
experience	O
with	O
the	O
ALGOL	B-General_Concept
68C	I-General_Concept
compiler	O
that	O
he	O
had	O
been	O
working	O
on	O
at	O
Cambridge	O
University	O
.	O
</s>
<s>
In	O
addition	O
to	O
the	O
style	O
in	O
which	O
the	O
program	O
was	O
written	O
,	O
Bourne	O
reused	O
portions	O
of	O
ALGOL	B-Language
68	I-Language
's	O
if	O
~	O
then	O
~	O
elif	O
~	O
then	O
~	O
else	O
~	O
fi	O
,	O
case	O
~	O
in	O
~	O
esac	O
and	O
for/while	O
~	O
do	O
~	O
od	O
"	O
(	O
using	O
done	O
instead	O
of	O
od	O
)	O
clauses	O
in	O
the	O
common	O
Unix	B-Application
Bourne	B-Device
shell	I-Device
syntax	O
.	O
</s>
<s>
Moreover	O
,	O
–	O
although	O
the	O
v7	O
shell	B-Application
is	O
written	O
in	O
C	B-Language
–	O
Bourne	O
took	O
advantage	O
of	O
some	O
macros	O
to	O
give	O
the	O
C	B-Language
source	O
code	O
an	O
ALGOL	B-Language
68	I-Language
flavor	O
.	O
</s>
<s>
These	O
macros	O
(	O
along	O
with	O
the	O
finger	B-Application
command	O
distributed	O
in	O
Unix	B-Application
version	O
4.2BSD	O
)	O
inspired	O
the	O
International	O
Obfuscated	O
C	B-Language
Code	O
Contest	O
(	O
IOCCC	O
)	O
.	O
</s>
<s>
Over	O
the	O
years	O
,	O
the	B-Device
Bourne	I-Device
shell	I-Device
was	O
enhanced	O
at	O
AT&T	O
.	O
</s>
<s>
The	O
various	O
variants	O
are	O
thus	O
called	O
like	O
the	O
respective	O
AT&T	O
Unix	B-Application
version	O
it	O
was	O
released	O
with	O
(	O
some	O
important	O
variants	O
being	O
Version7	O
,	O
SystemIII	O
,	O
SVR2	O
,	O
SVR3	O
,	O
SVR4	O
)	O
.	O
</s>
<s>
As	O
the	O
shell	B-Application
was	O
never	O
versioned	O
,	O
the	O
only	O
way	O
to	O
identify	O
it	O
was	O
testing	O
its	O
features	O
.	O
</s>
<s>
Features	O
of	O
the	B-Device
Bourne	I-Device
shell	I-Device
versions	O
since	O
1979	O
include	O
:	O
</s>
<s>
Duplex	O
Multi-Environment	B-Operating_System
Real-Time	I-Operating_System
(	O
DMERT	B-Operating_System
)	O
is	O
a	O
hybrid	O
time-sharing/real	O
-time	O
operating	B-General_Concept
system	I-General_Concept
developed	O
in	O
the	O
1970s	O
at	O
Bell	O
Labs	O
Indian	O
Hill	O
location	O
in	O
Naperville	O
,	O
Illinois	O
uses	O
a	O
1978	O
snapshot	O
of	O
Bourne	B-Device
Shell	I-Device
"	O
VERSION	O
sys137	O
DATE	O
1978	O
Oct	O
12	O
22:39:57	O
"	O
.	O
</s>
<s>
The	O
DMERT	B-Operating_System
shell	B-Application
runs	O
on	O
3B21D	B-Device
computers	O
still	O
in	O
use	O
in	O
the	O
telecommunications	O
industry	O
.	O
</s>
<s>
The	O
Korn	B-Language
shell	I-Language
(	O
ksh	B-Language
)	O
written	O
by	O
David	O
Korn	O
based	O
on	O
the	O
original	O
Bourne	B-Device
Shell	I-Device
source	O
code	O
,	O
was	O
a	O
middle	O
road	O
between	O
the	B-Device
Bourne	I-Device
shell	I-Device
and	O
the	O
C	B-Operating_System
shell	I-Operating_System
.	O
</s>
<s>
Its	O
syntax	O
was	O
chiefly	O
drawn	O
from	O
the	B-Device
Bourne	I-Device
shell	I-Device
,	O
while	O
its	O
job	B-Operating_System
control	I-Operating_System
features	O
resembled	O
those	O
of	O
the	O
C	B-Operating_System
shell	I-Operating_System
.	O
</s>
<s>
The	O
functionality	O
of	O
the	O
original	O
Korn	B-Language
Shell	I-Language
(	O
known	O
as	O
ksh88	B-Language
from	O
the	O
year	O
of	O
its	O
introduction	O
)	O
was	O
used	O
as	O
a	O
basis	O
for	O
the	O
POSIX	O
shell	B-Application
standard	O
.	O
</s>
<s>
A	O
newer	O
version	O
,	O
ksh93	B-Language
,	O
has	O
been	O
open	O
source	O
since	O
2000	O
and	O
is	O
used	O
on	O
some	O
Linux	B-Application
distributions	I-Application
.	O
</s>
<s>
A	O
clone	O
of	O
ksh88	B-Language
known	O
as	O
pdksh	B-Language
is	O
the	O
default	O
shell	B-Application
in	O
OpenBSD	B-Operating_System
.	O
</s>
<s>
Jörg	O
Schilling	O
's	O
Schily-Tools	O
includes	O
three	O
Bourne	B-Device
Shell	I-Device
derivatives	O
.	O
</s>
<s>
Bill	O
Joy	O
,	O
the	O
author	O
of	O
the	O
C	B-Operating_System
shell	I-Operating_System
,	O
criticized	O
the	B-Device
Bourne	I-Device
shell	I-Device
as	O
being	O
unfriendly	O
for	O
interactive	O
use	O
,	O
a	O
task	O
for	O
which	O
Stephen	O
Bourne	O
himself	O
acknowledged	O
C	B-Operating_System
shell	I-Operating_System
's	O
superiority	O
.	O
</s>
<s>
Bourne	O
stated	O
,	O
however	O
,	O
that	O
his	O
shell	B-Application
was	O
superior	O
for	O
scripting	O
and	O
was	O
available	O
on	O
any	O
Unix	B-Application
system	I-Application
,	O
and	O
Tom	O
Christiansen	O
also	O
criticized	O
C	B-Operating_System
shell	I-Operating_System
as	O
being	O
unsuitable	O
for	O
scripting	O
and	O
programming	O
.	O
</s>
<s>
Due	O
to	O
copyright	O
issues	O
surrounding	O
the	B-Device
Bourne	I-Device
Shell	I-Device
as	O
it	O
was	O
used	O
in	O
historic	O
CSRG	B-Operating_System
BSD	B-Operating_System
releases	O
,	O
Kenneth	O
Almquist	O
developed	O
a	O
clone	O
of	O
the	B-Device
Bourne	I-Device
Shell	I-Device
,	O
known	O
by	O
some	O
as	O
the	O
Almquist	B-Operating_System
shell	I-Operating_System
and	O
available	O
under	O
the	O
BSD	B-Operating_System
license	I-Operating_System
,	O
which	O
is	O
in	O
use	O
today	O
on	O
some	O
BSD	B-Operating_System
descendants	O
and	O
in	O
low-memory	O
situations	O
.	O
</s>
<s>
The	O
Almquist	B-Operating_System
Shell	I-Operating_System
was	O
ported	O
to	O
Linux	B-Application
,	O
and	O
the	O
port	O
renamed	O
the	O
Debian	B-Operating_System
Almquist	I-Operating_System
shell	I-Operating_System
,	O
or	O
dash	B-Operating_System
.	O
</s>
<s>
This	O
shell	B-Application
provides	O
faster	O
execution	O
of	O
standard	O
sh	O
(	O
and	O
POSIX-standard	O
sh	O
,	O
in	O
modern	O
descendants	O
)	O
scripts	O
with	O
a	O
smaller	O
memory	O
footprint	O
than	O
its	O
counterpart	O
,	O
Bash	B-Operating_System
.	O
</s>
<s>
Its	O
use	O
tends	O
to	O
expose	O
bashisms	O
–	O
bash-centric	O
assumptions	O
made	O
in	O
scripts	O
meant	O
to	O
run	O
on	O
sh	O
.	O
</s>
<s>
Bash	B-Operating_System
(	O
the	O
Bourne-Again	B-Operating_System
shell	I-Operating_System
)	O
was	O
developed	O
in	O
1989	O
for	O
the	O
GNU	B-Operating_System
project	I-Operating_System
and	O
incorporates	O
features	O
from	O
the	B-Device
Bourne	I-Device
shell	I-Device
,	O
csh	B-Operating_System
,	O
and	O
ksh	B-Language
.	O
</s>
<s>
rc	B-Operating_System
was	O
created	O
at	O
Bell	O
Labs	O
by	O
Tom	O
Duff	O
as	O
a	O
replacement	O
for	O
sh	O
for	O
Version	B-Operating_System
10	I-Operating_System
Unix	I-Operating_System
.	O
</s>
<s>
It	O
is	O
the	O
default	O
shell	B-Application
for	O
Plan	B-Operating_System
9	I-Operating_System
from	I-Operating_System
Bell	I-Operating_System
Labs	I-Operating_System
.	O
</s>
<s>
It	O
has	O
been	O
ported	O
to	O
UNIX	B-Application
as	O
part	O
of	O
Plan	B-Application
9	I-Application
from	I-Application
User	I-Application
Space	I-Application
.	O
</s>
<s>
Z	B-Application
shell	I-Application
,	O
developed	O
by	O
Paul	O
Falstad	O
in	O
1990	O
,	O
is	O
an	O
extended	O
Bourne	B-Device
shell	I-Device
with	O
a	O
large	O
number	O
of	O
improvements	O
,	O
including	O
some	O
features	O
of	O
Bash	B-Operating_System
,	O
ksh	B-Language
,	O
and	O
tcsh	B-Language
.	O
</s>
<s>
The	B-Device
Bourne	I-Device
shell	I-Device
was	O
once	O
standard	O
on	O
all	O
branded	O
Unix	B-Application
systems	I-Application
,	O
although	O
historically	O
BSD-based	O
systems	O
had	O
many	O
scripts	O
written	O
in	O
csh	B-Operating_System
.	O
</s>
<s>
As	O
the	O
basis	O
of	O
POSIX	O
sh	O
syntax	O
,	O
Bourne	B-Device
shell	I-Device
scripts	O
can	O
typically	O
be	O
run	O
with	O
Bash	B-Operating_System
or	O
dash	B-Operating_System
on	O
Linux	B-Application
or	O
other	O
Unix-like	B-Operating_System
systems	I-Operating_System
.	O
</s>
