I have an issue with running cat in shell script on a log file which is in ~/bin/rclone_sync_ACD.log. This is the line in the shell script:
RESULT=cat $LOGFILE | tail -1
But when running the script I get:
./rclone_sync: line 63: /Users/pjburnhill/bin/rclone_sync_ACD.log: Permission denied
In terminal, if I type cat $LOGFILE | tail -1
, it gives the right output.
What permissions would the script need to have to access and print out the correct line?
Thanks, PJ