0
我生成一个自定义脚本使用PHP,然后每隔一分钟我称之为。Linux的 - cronjob与sed返回错误
它是这样的:
grep -rl 'text1' ./ | xargs sed -i 's/text1/text'"$1"'/g'
当我运行它作为根(手动),它的伟大工程,但是当通过运行crontab我得到这个错误:
sed: -e expression #1, char 44: unterminated `s' command
./b.sh: 5: ./b.sh: [[: not found
如何解决?
运行以'ENV -i脚本/ b.sh'更加紧密地模型的crontab的环境。这听起来像你至少错过了shebang – 2014-11-08 18:34:59
@thatotherguy谢谢!我发现这个问题 – m3hdi 2014-11-08 19:30:50