Chapter 18. Writing Shell Scripts

The Solaris Operating Environment includes three shells: Bourne, Korn, and C. Each shell has its own high-level programming language that you can use to execute sequences of commands, select among alternative operations, perform logical tests, and repeat program actions. The Bourne and Korn shells use almost identical syntax, although the Korn shell is a superset of the Bourne shell and provides more functionality, including history and array capability. The Bourne shell is used for most scripts that are distributed with the Solaris Operating Environment. The C shell uses a syntax that is similar to C programming language syntax, and it has built-in capabilities not provided with the Bourne shell, such as history and array capability.

NOTE

The Solaris 8 Operating Environment also includes three freeware shells: The Bourne-Again shell (bash), the TC shell (tcsh), and the Z shell (zsh). For information about these shells, refer to the manual pages.


This chapter introduces the basic concepts of shell programming and the three shells, describes how shells work, and compares the syntax of the three basic shells; reference tables are provided throughout this chapter and are repeated in Chapter 19, “Reference Tables and Example Scripts.”

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.22.34