< Day Day Up > |
If you read, write, or maintain programs, the following samples will give you a quick overview of the construction and style of a shell script and introduce you to some of the constructs and syntax found in these programs. Note: If you are not familiar with programming, skip this chapter and go to Chapter 3 . When you have finished learning how to write scripts, you may want to return to this chapter for a quick reference to refresh your memory. The C shell and TC shell emulate the C language syntax whereas the Bourne shell is based on an older programming language called Algol. The Bash and Korn shells tend to be a combination of both the Bourne and C shells, although these shells originated from the Bourne shell. To illustrate the differences in the shells, four sample programs are provided, one for each shell (the C and TC shells are presented together here). Above each program, a list of basic constructs are described for the shell being examined. |
< Day Day Up > |