【Shell】Macの画面に通知ダイアログを出す方法

AppleScript 経由で Shellからでも通知ダイアログを出せる。

#!/bin/sh
/usr/bin/osascript -e 'display notification "hogehoge" with title "Fuga"'

真ん中に表示されるアラートダイアログと違って、右上にひっそり出てくる。

ログにも残っているので便利。

参考サイト