Answers:
去除 .
如果使scrip可执行文件chmod 755 <nameofscript>运行,则只需键入脚本路径。
当您看到./script正在使用该脚本时,它会告诉Shell该脚本位于您正在执行该脚本的同一目录中。要使用完整路径,请键入sh /home/user/scripts/someScript。
sh /path/to/file与有所不同/path/to/file。与链接的sh运行。/bin/sh/bin/dash
sh ./somescript它们也可以键入为“ sh / path / to / script / scriptitself”。