Chapter 9. Creating and Using Scripts

A script is simply a text file that contains a series of commands. By definition, a script must be read and executed by a program called an interpreter, a separate program that understands the commands in the script.

You may already be familiar with scripts written in AppleScript or JavaScript. In the Unix world, we often speak of shell scripts—scripts that are written to be interpreted by one of the Unix shells, such as sh, bash, and tcsh. These scripts use exactly the same commands that you would type at the command line using the corresponding shell. Indeed, one of the reasons for using a script is to reduce the chance of mistyping a complicated command line. So when you see the term Bourne shell script ...

Get Unix for Mac OS X 10.4 Tiger: Visual QuickPro Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.