gpt4 book ai didi

bash - 帮助基本的 shell 脚本。/bin/sh : source: not found

转载 作者:行者123 更新时间:2023-11-29 08:44:08 25 4
gpt4 key购买 nike

我的计划:

45 10 * * * source /home/ThinkCode/Test/hello.sh

你好.sh :

#!/bin/bash
echo "helloworld"

它通过电子邮件发送给我的错误:

/bin/sh: source: not found

我做错了什么?它是特定于配置/环境的,所以谷歌搜索没有多大帮助!谢谢..

最佳答案

真正的 sh 没有 source,只有 .。要么将 cron 中的 shell 更改为 bash,要么改用 .

关于bash - 帮助基本的 shell 脚本。/bin/sh : source: not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2975370/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com