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

11.4. Summary

The Bash Shell plays a vital part in Mac OS X operations, being used at system startup, and for system maintenance. You can use Bash to access a wealth of different Unix commands and combine them to undertake complex operations. These operations would be much more difficult to do with Finder.

In this chapter you learned

  • How to use the Terminal application, and the Nano editor, to use Bash interactively and write shell scripts

  • The most important Bash commands, for performing fundamental operations on files and text

  • About other less fundamental commands, some of which are found only on Mac OS X

  • How you write shell scripts with the programming constructs available in Bash, including conditional branching, looping, and functions

In the next chapter, you learn how to work with AppleScript and AppleScript Studio. AppleScript is quite a different beast to Bash in that it is generally used for scripting applications with a GUI rather than Unix commands. Before proceeding, however, try the exercises that follow to test your understanding of the material covered in this chapter. You can find the solutions to these exercises in the Appendix A.

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