B.2. bash versus sh

The Bourne Again (bash) shell has the following features not found in the traditional Bourne shell (sh).

  1. Formatting the prompts

  2. History (csh style)

  3. Aliases

  4. A built-in command line editor (emacs or vi) for editing the command line

  5. Directory manipulation with pushd and popd

  6. Csh type job control to stop or run jobs in the background, bring them to the foreground, etc. with command such as bg, fg, Ctrl-Z, etc.

  7. Tilde, brace, and parameter expansion

  8. Key bindings to customize key sequences

  9. Advanced pattern matching

  10. Arrays

  11. The select loop (from Korn shell)

  12. Many new built-in commands

Featurecsh/tcshBourneBashKorn
Variables:
Assigning values to local variablesset x = 5x=5x=5x=5
Assigning variable attributesdeclare or typesettypeset
Assigning values ...

Get Linux Shells by Example now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.