没有这样的文件或目录错误

时间:2019-02-19 22:44:02

标签: bash

这是我尝试在Mac OS 10.14环境中运行的Shell脚本。我的最初目标是让启动代理每天运行此脚本。当那行不通时,我将问题跟踪到了shell脚本本身。我知道路径是正确的,因为我自己都键入了路径,并尝试将目录和文件拖到Xcode中的脚本上,并允许编辑器自己构建路径。这是脚本:

#!/bin/bash
MC2XML="/Users/ericphil2/Scripts/mc2xml"
XMLTV="/Users/ericphil2/Scripts/xmltv.xml"
#Set the working directory
cd /Users/ericphil2/Scripts
#Get new schedule
    $MC2XML -J -c us -g 14519
#Reload EyeTV with the file
    open -a EyeTV $XMLTV

运行此命令时,出现以下错误:

[MacPro:~/Scripts] ericphil2% sh /Users/ericphil2/Scripts/getepg.sh 
: No such file or directorytepg.sh: line 5: cd: /Users/ericphil2/Scripts
: No such file or directorytepg.sh: line 7: /Users/ericphil2/Scripts/mc2xml
 does not exist.ericphil2/Scripts/xmltv.xml

0 个答案:

没有答案