Friday, 09 December 2011
Evolution of shells in Linux From Bourne to Bash and beyond By M. Tim Jones
IBM Developerworks has a writeup on the evolutions of shells in Linux. Covers a fair bit of territory and is a nice read with some scripting comparisons to help get a bit more context.
Here's a brief blurb:
Shells—or command-line interpreters—have a long history, but this discussion begins with the first UNIX® shell. Ken Thompson (of Bell Labs) developed the first shell for UNIX called the V6 shell in 1971. Similar to its predecessor in Multics, this shell (/bin/sh) was an independent user program that executed outside of the kernel. Concepts like globbing (pattern matching for parameter expansion, such as *.txt) were implemented in a separate utility called glob, as was the if command to evaluate conditional expressions. This separation kept the shell small, at under 900 lines of C source (see Resources for a link to the original source).
The shell introduced a compact syntax for redirection (< > and >>) and piping (| or ^) that has survived into modern shells. You can also find support for invoking sequential commands (with ;) and asynchronous commands (with &).
What the Thompson shell lacked was the ability to script. Its sole purpose was as an interactive shell (command interpreter) to invoke commands and view results.
URL: http://www.ibm.com/developerworks/linux/library/l-linux-shells/index.html