mem*_*und 6 command-line at-command
我有一个 bash 脚本,它每天使用crontab.
该脚本检查一个条件,如果为真,它应该at command在特定时间发出一个。
at 14:10 <notify-send hello>
问题是:如何notify-send向at命令添加特定命令?
Pil*_*ot6 11
echo "notify-send 'hello'" | at 14:10
Run Code Online (Sandbox Code Playgroud)
at 期待来自 STDIN 的命令。
如果要使/bin/sh警告静音,请按以下方式运行:
echo "notify-send 'hello'" | at 14:10 2>/dev/null
Run Code Online (Sandbox Code Playgroud)