Home > Articles > Operating Systems, Server > Linux/UNIX/Open Source

UNIX Shell Programming QuickStart

  • Print
  • + Share This
So you want to start programming UNIX shells. You could sit down with a dense volume of coding advice, but you're a techie. You want to jump right in and start coding. This chapter will help you get started right away with shell programming in UNIX.
This chapter is from the book

This chapter is from the book

2.1 Taking a Peek at Shell Scripts

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.

  • + Share This
  • 🔖 Save To Your Account