Show a Notification Center alert from a shell script or AppleScript — by grg on Ask Different
AppleScript's built-in display notification command shows a native notification without any extra apps. From a shell script you can call it through osascript, which is handy when a long job finishes.
Quick steps
- AppleScript: display notification "Done" with title "Backup"
- From the shell: osascript -e 'display notification "Done" with title "Backup"'
Paraphrased from the source. Menus can differ by version, so check the original for full details.
Source: Show a Notification Center alert from a shell script or AppleScript by grg on Ask Different. Licence: CC BY-SA (Stack Exchange; version depends on post date).
- Source reviewed
- 2026-11-02
- Link checked
- Not yet
- Tested hands-on
- Not by Oddbyte.Me