terminal(bash)からnotificationを送信するためには、「terminal-notifier」というツールが便利です。
Here's how.
brew install terminal-notifier
From bash
# 書式
# terminal-notifier -message "type message" -title "type title"
terminal-notifier -message "テスト" -title "terminal-notifier"
実行結果

Do Not Disturbの設定が有効な場合には、表示されませんのでご注意を。


参考にさせていただきました。ありがとうございました。