Sobell on the Bourne Again Shell and the Linux Command Line - page 2
The Fate of the Command Line
LP: Would you discuss the Bourne Again shell and explain how it compares to the original Bourne Shell?
The shell is the command line interpreter -- it parses the command lines you enter and calls the programs you request, passing to the program the arguments you entered on the command line. The shell is also a high-level programming language. The Bourne Again Shell, or bash, is the default shell on many Linux systems. Other shells are included with most distributions and even more are available for download.
The Bourne Again Shell, written by the GNU project, is a souped up version of the original Bourne Shell (sh), the first shell available under UNIX as it was released by AT&T. I used to recommend that readers consider using the C Shell (csh) as their interactive shell because it has some important features that are not available in the original Bourne Shell. Today bash has all those features and then some, including command completion, history (so you can edit and repeat previous commands), and job control (allows you to move jobs between the foreground and background). And of course you can write shell scripts (batch files) using bash.
Many Linux system shell scripts start with the line #!/bin/sh. This line causes the script to run under the sh program, which is not the original Bourne Shell, but a link to bash.
"Because of its long and successful history, the original Bourne Shell has been used to write many of the shell scripts that help manage UNIX systems. Some of these scripts appear in Linux as Bourne Again Shell scripts. Although the Bourne Again Shell includes many extensions and features not found in the original Bourne Shell, bash maintains compatibility with the original Bourne Shell so you can run Bourne Shell scripts under bash. On UNIX systems the original Bourne Shell is named sh. On Linux systems sh is a symbolic link to bash ensuring that scripts that require the presence of the Bourne Shell still run. When called as sh, bash does its best to emulate the original Bourne Shell."
LP: Would you recommend that someone new to Linux learn the Bourne Again Shell or the TC Shell?
If you are a hard-core C Sheller, go ahead and use the TC Shell (tcsh). Otherwise I would stick with bash. Almost all administration shell scripts that control a Linux system are written to be run by bash, so if you learn bash you will be able to understand and modify those scripts more easily.
Solid state disks (SSDs) made a splash in consumer technology, and now the technology has its eyes on the enterprise storage market. Download this eBook to see what SSDs can do for your infrastructure and review the pros and cons of this potentially game-changing storage technology.
- 1Linux Top 3: GNOME 3.12 and New Betas for Ubuntu 14.04 and OpenMandriva Lx 2014.0
- 2Linux Top 3: Linus Lashes out, Linux 3.14 Gets PIE and Ubuntu One is Done.
- 3Linux Top 3: Ubuntu 14.04, Debian Gives Squeeze More Life and Red Hat Goes Atomic
- 4Linux Top 3: CoreOS, Oracle Enterprise Linux 7 and Ubuntu 14.10
- 5Linux Top 3: Debian Dumps SPARC, Ubuntu Takes Over Linux 3.13 and the Core Infrastructure Initiative