小编ale*_*xus的帖子

Syntax error: EOF in backquote substitution

I scheduled following cron job:

root@alexus:~# crontab -l | grep ^\@hourly
@hourly     OUT=`/usr/lib/nagios/plugins/check_disk --include-type=ext4 --warning=10% --critical=5%` ; if [ $? != 0 ] ; then echo $OUT ; fi
root@alexus:~# OUT=`/usr/lib/nagios/plugins/check_disk --include-type=ext4 --warning=10% --critical=5%` ; if [ $? != 0 ] ; then echo $OUT ; fi
root@alexus:~# cat /etc/issue.net 
Ubuntu 14.04.3 LTS
root@alexus:~# 
Run Code Online (Sandbox Code Playgroud)

and even though I'm able to run EXACTLY same one liner within shell, whenever job gets executed via cron, I get following email:

主题:Cron OUT=`/usr/lib/nagios/plugins/check_disk --include-type=ext4 …

bash cron

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

bash ×1

cron ×1