Chapter 11. The Bash Shell

At the heart of every Mac OS X system is a Unix core. If you don't look for it, you won't see it, but it's there. Like all Unix-based systems, Mac OS X relies heavily on shell scripts. When you log in to your account at startup—whatever you happen to be doing on Mac OS X—chances are good that a shell script is involved in some way.

If you read Chapter 10, you know that scripts are simple programs that string together Unix commands to perform a task. Scripts are run by a program called a shell, which interprets one line of code at a time. On Mac OS X, the default shell is called Bash; Bash is a powerful shell that can be used interactively, or to run scripts.

In this chapter you learn

  • How to configure and use Bash interactively and for running scripts

  • How to use the Terminal application for accessing the command line

  • The most important Unix commands and where to find information about commands

  • Some of the commands only available on Mac OS X

  • Basic shell programming

Get Beginning Mac OS® X Programming 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.