The Origin of Bash
Bash的起源
A shell is a program that runs operating system commands. Using a conventional desktop,the user selects an item with the mouse and then applies an action to it, such as highlighting an icon and choosing to copy it. In a shell, the person types instructions (or actions) followed by the targets and any special options.This counterintuitive interface can confuse new users who are used to conventional desktops.
Counterintuitive:违反直觉的
The first Unix shell was the developed by Steven R. Bourne in 1974 for the Seventh Edition of Unix. Called the Bourne shell (or sh) in honor of its creator, it set the standard for Unix shells, including the default dollar sign ($) prompt common to most shells.
Users frequently had to type the same commands over and over again.Writing a program to repeat their commands required a high-level language like C. Instead, it was useful to compose a list of commands for the shell to execute, as if the shell was following a well-rehearsed script.With the addition of features to make simple decisions and loops, these shell scripts could run commands and determine whether they succeeded or failed, taking appropriate action, without resorting to a different language.When commands are combined in new ways in a script, a script conceptually becomes a new command.Scripts can customize and extend operating systems.
well-rehearsed:预先排练好的、预设好的、安排好的、设计好的
resorting to:求助于、诉诸于
Designed to be as small and as open as possible, any feature that did not have to be built into the shell wasn’t. Even arithmetic was performed by other programs outside of the shell.This slowed the shell, but speed was not an important factor when the shell spent most of its time waiting on other programs or on the user.To the shell’s advantage, if a user needed new or better capabilities, the user could write additional scripts to provide those additional capabilities.
Arithmetic: 算术运算
Many rival shells began to appear, offering improvements in speed and capabilities.Two of the most common successors were csh, a shell loosely based on the C language,and the Korn shell (ksh), an improved Bourne shell developed by David G. Korn. Shell designers incorporated commands into the shell for better speed and portability and to make the shells easier to work with. Successful features were freely copied between shells as they matured.
Rival:竞争对手
An enhanced version of the Bourne shell was developed as part of the GNU project used by the Linux operating system.The shell was called Bash (for the pun “Bourne Again Shell”).This shell was compatible with the original shell created by Steven R. Bourne, but included many enhancements. It was also compliant with the POSIX standard for shells.
Bash is the standard shell provided with most Linux distributions, including Red Hat, SuSE, Mandrake, Slackware, and UnitedLinux.