Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Scripts

A script is a set of text commands that are interpreted at runtime and turned into a sequence of actions. Most scripting languages provide high-level features that make it easy to implement complex workflows very quickly. Scripting languages are often very flexible, letting you call other programs and manipulate the data they return. Some scripting languages are also portable across platforms, so that you can use your scripts anywhere.

Table 6-1 lists many of the scripting languages supported by Mac OS X along with a description of the strengths of each language.

Table 6-1  Scripting language summary

Script language

Description

AppleScript

An English-based language for controlling scriptable applications in Mac OS X. Use it to tie together applications involved in a custom workflow or repetitive job. You can also use AppleScript Studio to create standalone applications whose code consists primarily of scripts. See Getting Started With AppleScript for more information.

bash

A Bourne-compatible shell script language used to build programs on UNIX-based systems.

csh

The C shell script language used to build programs on UNIX-based systems.

Perl

A general-purpose scripting language supported on many platforms. It comes with an extensive set of features suited for text parsing and pattern matching and also has some object-oriented features. See http://www.perl.org/ for more information.

PHP

A cross-platform, general-purpose scripting language that is especially suited for web development. See http://www.php.net/ for more information.

Python

A general-purpose, object-oriented scripting language implemented for many platforms. See http://www.python.org/ for more information. In Mac OS X v10.4 and later, you can also use Python with the Cocoa scripting bridge; see Ruby and Python Programming Topics for Mac OS X.

Ruby

A general-purpose, object-oriented scripting language implemented for many platforms. See http://www.ruby-lang.org/ for more information. In Mac OS X v10.5 and later, you can also use Ruby with the Cocoa scripting bridge; see Ruby and Python Programming Topics for Mac OS X.

sh

The Bourne shell script language used to build programs on UNIX-based systems.

Tcl

Tool Command Language. A general-purpose language implemented for many platforms. It is often used to create graphical interfaces for scripts. See http://www.tcl.tk/ for more information.

tcsh

A variant of the C shell script language used to build programs on UNIX-based systems.

zsh

The Z shell script language used to build programs on UNIX-based systems.

For introductory material on using the command line, see “Command Line Primer.”



< Previous PageNext Page > Hide TOC


Last updated: 2007-10-31




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice