Shell scripts are useful when there are two or
more commands that you frequently run at the same time, or when
there is some complex task that you want to automate. For example,
you can use shell scripts to keep watch on your mailfolders and
prepare various reports on their contents; or you can use shell
scripts to automate backup procedures, periodically copying files to
tape. However, the shells provide such a powerful tool that complex
programs have been written using the scripting language: the uses
are limited only by your imagination.
The syntax described in this chapter is common to the Bourne shell
and the Korn shell; for C shell syntax, refer to
csh(C)
in the Operating System User's Reference.