Mac Automation Scripting Guide: Calling Command-Line Tools — by Apple Developer Documentation
Apple's guide to running shell commands from AppleScript with do shell script, including building a command by concatenation and why paths with spaces break unless wrapped with quoted form of. This is an archived page, so details may predate current macOS.
Quick steps
- do shell script "ls /Applications/"
- Wrap paths with quoted form of to survive spaces
Paraphrased from the source. Menus can differ by version, so check the original for full details.
Source: Mac Automation Scripting Guide: Calling Command-Line Tools by Apple Developer Documentation. Licence: Link only (©).
- Source reviewed
- 2026-11-02
- Link checked
- 2026-11-02
- Tested hands-on
- Not by Oddbyte.Me