【发布时间】:2013-11-06 19:23:03
【问题描述】:
我想在通知中显示 shell 脚本运行的结果 (exiftool -k -P -overwrite_original_in_place -ImageDescription= "$1"/*.ARW)。我尝试在主题中使用 $1 作为文本,但它显示的正是 $1 而不是脚本输出。
【问题讨论】:
标签: macos shell notifications automator
我想在通知中显示 shell 脚本运行的结果 (exiftool -k -P -overwrite_original_in_place -ImageDescription= "$1"/*.ARW)。我尝试在主题中使用 $1 作为文本,但它显示的正是 $1 而不是脚本输出。
【问题讨论】:
标签: macos shell notifications automator
在 10.9 或更高版本中,您可以使用display notification AppleScript 命令:
osascript -e 'on run {t}' -e 'display notification "" with title "t"' -e end title
在 10.8 中,您可以使用终端通知器:
terminal-notifier -title title -message ''
可以使用sudo gem install terminal-notifier 安装终端通知器。
【讨论】: