O'Reilly logo

Beginning Mac OS® X Programming by Drew McCormack, Michael Trent

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required