Skip to main content
Source Link
Noldorin
  • 1k
  • 3
  • 14
  • 27

AppleScript vs. Bash script?

I'm a long-time Windows "power user" and developer who has recently decided to move over to Mac OS X.

On OS X Lion and indeed previous versions there seem to be two main options for scripting and automation in OS X: AppleScript and Bash script. The latter is of course a direct consequence of OS X using the Unix "bash" shell, while the former is Apple's own innovation. The syntaxes are clearly very different, with AppleScript having a pseudo-natural-language style.

My question is, are AppleScript and Bash script commonly used (indeed, should they be used) for disparate tasks and purposes on OS X. I am vaguely cognizant of the vast array of tasks I can accomplish with Bash script, though of course the code for some more advanced ones can quickly become convoluted. Do these two languages have overlapping or near-identical usage cases, despite Apple's later invention of AppleScript -- or are they intended to be used with different scenarios in mind? A high-level overview as well as some specific examples would be appreciated.