|
|
You can use the shell to create programs--new commands. Such programs are also called shell procedures. This section tells you how to create and execute shell programs using commands, variables, positional parameters, return codes, and basic programming control structures.
The examples of shell programs in this section are shown two ways. First, the cat command is used in a screen to display the contents of a file containing a shell program:
$ cat testfile first_command . . . last_command $Second, the results of executing the shell program appear after a command line:
$ testfile program_output $You should be familiar with an editor before you try to create shell programs.