The first Unix command line interpreter, named after its author. Many different versions exist, which makes it difficult to write fully portable shell scripts; but every Unix variant is expected to carry a largely compatible Bourne shell in /bin/sh.

The Bourne shell has pretty awful syntax (due largely to its crazy rules for the interpretation of whitespace around assignments, and its horrible quoting conventions), but its semantics are elegant, which makes it a good language for shell scripts. Better than the C shell, in any case.

Versions of /bin/sh on different Unix systems vary in features - one example is the support of functions - but there are also sh-compatible shells under a different name. One is the Korn shell, /bin/ksh, which is part of System V and hence, appears in today's officially branded Unixen such as Solaris. Another is the 'Bourne again' shell, bash, which actually strives for ksh compatibility, but I guess 'Korn again' didn't sound as good.

Who remembers Unix V6?

Ah, life was simpler then...

There was a time when users where tickled to hold Eliza-like conversations with the Bourne shell, running on a PDP 11/34 with 512Kb actual core memory and 8Mb of on-line disk. (Don't laugh! 8-12 simultaneous users doing real work on a system with less grunt than a contemporary MP3 player. Back when men were real men, ...)

% light?
light? - no match!
%    

The '%' in the above was the standard prompt for ordinary users. The '?' was treated as a single character wildcard by the shell. And the "no match" was the shell's error response. (I vaguely recall that "wild card expansion" was handled by a binary exec'd by /bin/sh. Ah, for those modular days and Unix principles ... before Micro$oft began defining an OS as EVERYTHING UNDER THE SUN!)

Log in or registerto write something here or to contact authors.