osascript是什么
man osascript
osascript -- execute OSA scripts (AppleScript, JavaScript, etc.)
显示桌面通知
osascript -e ' display notification "通知内容" with title "标题" subtitle "子标题" '
显示系统信息
osascript -e "system info"
osascript -e "IPv4 address of (system info)"
osascript -e "CPU type of (system info)"
# Intel x86-64h Haswell
参考:
https://www.jianshu.com/p/4fefe8a905af
https://www.jianshu.com/p/cd76b0f31ea9
https://segmentfault.com/a/1190000011273388
https://github.com/linjunpop/imessage/blob/c026cd9011b3b5ba99687c3dcf13957da6137bac/lib/imessage/sender.rb#L51
https://apple.stackexchange.com/questions/103621/run-applescript-from-bash-script
网友评论