Virtually the entire repertoire of UNIX commands, utilities, and tools is available for invocation by a shell script. If that were not enough, internal shell commands, such as testing and loop constructs, give additional power and flexibility to scripts. Shell scripts lend themselves exceptionally well to to administrative system tasks and other routine repetitive jobs not requiring the bells and whistles of a full-blown tightly structured programming language. A working knowledge of shell scripting is essential to everyone wishing to become reasonably adept at system administration, even if they do not anticipate ever having to actually write a script. A detailed understanding of these scripts is important for analyzing the behavior of a system, and possibly modifying it.
Most short scripts work right the first time, and debugging even the longer ones is straightforward.
Getting even a limited subset of the functionality to work in a shell script, even if slowly, is often a useful first stage in project development. Shell scripting hearkens back to the classical UNIX philosophy of breaking complex projects into simpler subtasks, of chaining together components and utilities. Even then, prototyping the application as a shell script might still be a useful development step. The following is a tutorial in shell scripting. It relies heavily on examples to illustrate features of the shell.