exec抛出“没有这样的文件或目录”。但是文件夹存在,文件也存在
我正在使用以下exec
命令:
mainfolder 是主要文件夹 内部 mainscript.sh 和设置文件夹
mainscript.sh (位于 mainfolder 中):
....
...
...
exec "../settings/helper.sh"
文件helper.sh
是当前目录之前的一个文件夹,在设置
文件夹中 但是exec
投掷否此类文件或目录
。
知道如何解决这个问题?
I'm using the following exec
command:
MainFolder is the main folder
inside it mainScript.sh and settings folder
mainScript.sh (Located in MainFolder) :
....
...
...
exec "../settings/helper.sh"
The file helper.sh
is located one folder before the current directory , in settings
folder
but exec
throws no such file or directory
.
Any idea how to fix this ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须在脚本mainscript.sh中声明
可变
mainfolter
的
You have to declare the variable MAINFOLDER in your script mainScript.sh
and call any script relative to
$MAINFOLDER
if settings is in $MAINFOLDER
if settings is located one folder before