Distributed Networks Distributed Networks

Shell Components   «Prev  Next»
Lesson 1

Components of a shell program

The previous module introduced you to many of the available programming tools and explained when shell scripts are the best tool to solve a problem.
This module provides more information to help you understand the commands and tools you will be using to create your first shell script. By the end of this module, you will be able to:
  1. Explain situations in which a shell script is most useful
  2. Define external and built-in commands
  3. List commands used to communicate with users
  4. Identify how tests are used within shell scripts
  5. Define the different variable types used in shell scripts
  6. Describe how control structures determine how a script operates

Berkeley C shell
Because the Berkeley C shell (csh) offered features that were more pleasant for interactive use, such as command history and job control, for a long time the standard practice in the Unix world was to use the Bourne shell for programming and the C shell for daily use.
David Korn at Bell Labs was the first developer to enhance the Bourne shell by adding csh-like features to it:
  1. history,
  2. job control, and
  3. additional programmability.
Eventually, the Korn shell's feature set surpassed both the Bourne shell and the C shell, while remaining compatible with the Bourne shell for shell programming.
Today, the POSIX standard defines the standard shell language and behavior based on the System V Bourne shell, with a selected subset of features from the Korn shell.