This is a shell script I am trying to run in a Mac OS 10.14 environment. My initial goal was to have this script run daily by a launch agent. When that wouldn't work I tracked the problem to the shell script itself. I know the paths are correct since I have both typed them myself and tried dragging the directories and files onto the script in Xcode and allowing the editor to build the paths itself. Here is the script:
#!/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
When I run this I get the following errors:
[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