关于./xxx.sh:No such file or directory 的问题解决

问题

利用shell脚本启动从机的elasticsearch的时候发现,只有主机启动了,从机未启动,发现shell命令里面,找不到 ./remote.sh文件

解决方法:

由于shell脚本内用的是相对路径,不知道为什么系统未能读取,运用绝对路径重写,最后执行成功!

  ./remote.sh  =>  sh /home/1234/shell/remote.sh

原文地址:https://www.cnblogs.com/afeiiii/p/13485532.html