<s>
The	O
PWB	B-Application
shell	I-Application
(	O
also	O
known	O
as	O
the	O
Mashey	B-Application
shell	I-Application
)	O
was	O
a	O
Unix	B-Application
shell	I-Application
.	O
</s>
<s>
The	O
PWB	B-Application
shell	I-Application
was	O
a	O
modified	O
(	O
and	O
generally	O
constrained	O
to	O
be	O
upward-compatible	O
)	O
version	O
of	O
the	O
Thompson	B-Application
shell	I-Application
with	O
additional	O
features	O
to	O
increase	O
usability	O
for	O
programming	O
.	O
</s>
<s>
PWB/UNIX	B-Operating_System
started	O
with	O
Research	B-Operating_System
Unix	I-Operating_System
4th	O
Edition	O
in	O
mid-October	O
1973	O
,	O
and	O
was	O
frequently	O
updated	O
over	O
the	O
next	O
few	O
years	O
,	O
as	O
the	O
PWB	O
department	O
tracked	O
Research	B-Operating_System
Unix	I-Operating_System
changes	O
and	O
added	O
a	O
few	O
features	O
.	O
</s>
<s>
The	O
PWB	B-Application
shell	I-Application
was	O
released	O
in	O
mid-1975	O
and	O
remained	O
available	O
through	O
Version	O
6	O
Unix-based	O
PWB/UNIX	B-Operating_System
.	O
</s>
<s>
In	O
Version	B-Operating_System
7	I-Operating_System
Unix	I-Operating_System
(	O
1979	O
)	O
,	O
the	O
PWB	B-Application
shell	I-Application
was	O
superseded	O
by	O
the	B-Device
Bourne	I-Device
shell	I-Device
.	O
</s>
<s>
The	O
PWB	B-Application
shell	I-Application
was	O
the	O
standard	O
shell	O
for	O
PWB/UNIX	B-Operating_System
,	O
circa	O
1975	O
–	O
78.	O
,	O
but	O
did	O
not	O
run	O
on	O
any	O
edition	O
of	O
Research	B-Operating_System
Unix	I-Operating_System
,	O
as	O
it	O
required	O
a	O
new	O
system	O
call	O
udata(2 )	O
that	O
let	O
login(1 )	O
set	O
login	O
name	O
,	O
login	O
directory	O
( $s	O
)	O
and	O
TTY	O
( $t	O
)	O
so	O
sh(1 )	O
to	O
obtain	O
them	O
.	O
</s>
<s>
Several	O
features	O
were	O
introduced	O
in	O
the	O
PWB	B-Application
shell	I-Application
that	O
remain	O
in	O
many	O
later	O
shells	O
.	O
</s>
<s>
The	O
if	O
and	O
goto	O
commands	O
were	O
made	O
internal	O
to	O
the	O
shell	O
,	O
and	O
extended	O
to	O
allow	O
if-then-else-endif	O
,	O
and	O
switch	O
and	O
while	O
constructs	O
were	O
introduced	O
,	O
as	O
well	O
as	O
onintr	O
to	O
ignore	O
interrupts	O
or	O
catch	O
them	O
to	O
perform	O
cleanup	O
.	O
</s>
<s>
Simple	O
variables	O
could	O
be	O
used	O
,	O
although	O
their	O
names	O
were	O
limited	O
to	O
one	O
letter	O
and	O
some	O
letters	O
were	O
reserved	O
for	O
special	O
purposes	O
,	O
of	O
which	O
some	O
are	O
the	O
precursors	O
of	O
the	O
environment	O
variables	O
found	O
in	O
all	O
Unix	B-Application
systems	I-Application
from	O
Version	B-Operating_System
7	I-Operating_System
onward	O
.	O
</s>
<s>
Unlike	O
most	O
of	O
the	O
UNIX	B-Application
systems	I-Application
of	O
the	O
time	O
,	O
the	O
original	O
PWB/UNIX	B-Operating_System
computer	O
center	O
was	O
shared	O
by	O
multiple	O
programming	O
groups	O
who	O
could	O
not	O
change	O
the	O
contents	O
of	O
/bin	O
or	O
/usr/bin	O
,	O
but	O
wanted	O
to	O
create	O
their	O
own	O
sets	O
of	O
shared	O
commands	O
.	O
</s>
<s>
In	O
addition	O
,	O
the	O
shell	O
's	O
command-searching	O
was	O
enhanced	O
to	O
allow	O
shell	O
procedures	O
to	O
be	O
invoked	O
like	O
binary	O
commands	O
,	O
i.e.	O
,	O
if	O
the	O
shell	O
found	O
a	O
non-binary	O
file	O
marked	O
executable	O
,	O
it	O
would	O
fork	O
another	O
shell	O
instance	O
to	O
read	O
that	O
file	O
as	O
a	O
shell	B-Language
script	I-Language
.	O
</s>
<s>
The	O
$	O
character	O
,	O
used	O
previously	O
for	O
identifying	O
arguments	O
to	O
a	O
shell	B-Language
script	I-Language
,	O
became	O
the	O
marker	O
for	O
dereferencing	O
a	O
variable	O
,	O
and	O
could	O
be	O
used	O
to	O
insert	O
a	O
variable	O
's	O
value	O
into	O
a	O
string	O
in	O
double	O
quotes	O
.	O
</s>
<s>
(	O
In	O
addition	O
to	O
later	O
shells	O
,	O
this	O
feature	O
would	O
also	O
later	O
appear	O
in	O
the	O
Perl	B-Language
and	O
PHP	B-Application
programming	I-Application
languages	I-Application
.	O
)	O
</s>
<s>
These	O
features	O
could	O
not	O
overcome	O
the	O
shortcomings	O
of	O
the	O
Thompson	B-Application
shell	I-Application
,	O
and	O
so	O
a	O
new	O
shell	O
was	O
written	O
from	O
scratch	O
by	O
Stephen	O
Bourne	O
.	O
</s>
<s>
This	O
Bourne	B-Device
shell	I-Device
was	O
incompatible	O
with	O
the	O
Thompson	O
and	O
PWB	B-Application
shells	I-Application
,	O
but	O
included	O
equivalents	O
of	O
most	O
of	O
the	O
PWB	B-Application
shell	I-Application
's	O
features	O
,	O
but	O
done	O
from	O
scratch	O
,	O
rather	O
than	O
incrementally	O
,	O
with	O
much	O
discussion	O
among	O
the	O
various	O
participants	O
.	O
</s>
<s>
After	O
the	O
adoption	O
of	O
the	B-Device
Bourne	I-Device
shell	I-Device
as	O
the	O
standard	O
shell	O
in	O
Version	B-Operating_System
7	I-Operating_System
Unix	I-Operating_System
,	O
use	O
of	O
the	O
PWB	B-Application
shell	I-Application
was	O
phased	O
out	O
,	O
although	O
for	O
a	O
while	O
,	O
there	O
was	O
an	O
internal	O
Bell	O
Labs	O
course	O
called	O
Bourne	B-Device
Shell	I-Device
Programming	O
for	O
Mashey	B-Application
Shell	I-Application
Programmers	O
.	O
</s>
<s>
The	O
C	B-Operating_System
shell	I-Operating_System
,	O
developed	O
before	O
the	O
public	O
release	O
of	O
the	B-Device
Bourne	I-Device
shell	I-Device
,	O
also	O
inherited	O
some	O
of	O
the	O
features	O
of	O
the	O
PWB	B-Application
shell	I-Application
.	O
</s>
