[英]Help with basic shell script. /bin/sh: source: not found
My cron : 我的cron:
45 10 * * * source /home/ThinkCode/Test/hello.sh
hello.sh : hello.sh:
#!/bin/bash
echo "helloworld"
The error it emails me : 它通过电子邮件向我发送错误:
/bin/sh: source: not found
What am I doing wrong? 我究竟做错了什么? It is configuration/environment specific, so Googling didn't help much! 它是配置/环境特定的,所以谷歌搜索没有多大帮助! Thanks.. 谢谢..
Real sh
doesn't have source
, only .
Real sh
只有source
.
. 。 Either change the shell in cron to bash
, or use .
将cron中的shell更改为bash
,或者使用.
instead. 代替。
Why are you source
ing the file from cron. 你为什么source
荷兰国际集团从cron文件。 Why not just execute it? 为什么不执行呢?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.