The first line, the one beginning with #! (called a shebang), tells Unix to execute the commands in the file
using the program sh, also known as the Bourne shell. The lines beginning with # are comment lines. The
remaining lines are commands whose parameters are constructed from the variables defined by the original
command line arguments.
The Bourne shell scripting language is one of many scripting languages one can categorize as job
control language (JCL) scripting languages. Others include the C shell (csh), the Korn shell (ksh), Bash (Bourne
Again SHell), JCL and JES2 (IBM??™s languages for mainframes), and MS-DOS Batch. They are all similar
in that they can accept a file of commands as input, incorporate values of parameters available at execution
time, and execute the sequence of commands. Except for JCL and JES2, they all have limited programming
controls as well, and include conditional expressions and the ability to loop and branch during execution of the
command file.
Here??™s an example MS-DOS Batch file that will copy a list of files to a directory called DUPLICAT. Lines
beginning with twin colons are comment lines. Lines beginning with a single colon are ???labels??? referred to by
other statements.
Pages:
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158