Skip to Main Content
Learning Unix for Mac OS X, Second Edition
book

Learning Unix for Mac OS X, Second Edition

by Brian Jepson, Dave Taylor
December 2002
Beginner content levelBeginner
160 pages
4h 22m
English
O'Reilly Media, Inc.
Content preview from Learning Unix for Mac OS X, Second Edition

Types of Commands

When you use a program, you’ll want to know how to control it. How can you tell it what job you want done? Do you give instructions before the program starts, or after it’s started? There are several general ways to give commands on a Mac OS X system. It’s good to be aware of them.

Graphical programs

Some programs work only within the graphical window environment (on Mac OS X, this is called Aqua). On Mac OS X, you can run these programs using the open command. For instance, when you type open -a Chess at a shell prompt, the chess game starts. It opens one or more windows on your screen. The program has its own way to receive your commands — through menus and buttons on its windows, for instance. Although you can’t interact with these programs using traditional Unix utilities, Mac OS X includes the osascript utility, which lets you run AppleScript commands from the Unix shell.

Non-interactive Unix programs

You’ve also seen in Section 1.2 that you can enter many Unix commands at a shell prompt. These programs work in a window system (from a Terminal window) or from any terminal. You control those programs from the Unix command line — that is, by typing options and arguments from a shell prompt before you start the program. After you start the program, wait for it to finish; you generally don’t interact with it.

Interactive Unix programs

Some Unix programs that work in the terminal window have commands of their own. (If you’d like some examples, see Chapter 2 and

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mac OS X for Absolute Beginners

Mac OS X for Absolute Beginners

Wallace Wang
JMP Connections

JMP Connections

John Wubbel
Using csh & tcsh

Using csh & tcsh

Paul DuBois

Publisher Resources

ISBN: 0596004702Catalog PageErrata