Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 27. Interacting with the Unix Co... > Why and When Are Shell Scripts Used ...

27.1. Why and When Are Shell Scripts Used in AppleScript?

Although working with the Unix command line is different from working in AppleScript, in many situations the two can complement one another nicely. Many tasks where AppleScript is known to be weak, such as advanced text processing, raw performance, and access to lower-level operating system features, are long-time strengths of the Unix world. Decades of Unix development have produced a wide range of powerful, fast, and reliable command-line applications, many of which are freely available over the Internet or already installed on Mac OS X ready for you to use. At the same time, AppleScript provides terrific support for controlling scriptable GUI applications on Mac OS X—something that's crucial to many Mac users and an area where its Unix side is still playing catch-up.

By combining the two, you get the best of both worlds. Your AppleScripts can call into Unix scripts to help out with heavy-duty data-crunching tasks, and the Unix scripts can call into AppleScript when they want to work with Apple iTunes or Apple iCal. Although the integration isn't completely seamless and you still need to watch out for a few issues, it is still a highly valuable addition to an AppleScripter's toolbox, alongside traditional AppleScript solutions such as scriptable applications, scripting additions, and script libraries.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial