I have an Ubuntu Studio 16.10 64 bit. I created a shell script xyz.sh the path to the file is home/somefolder/test/xyz.sh I have already added
`chmod u+x xyz.sh`
and I ran the script
./xyz.sh
It was successfull.
However, when I did a cd to go to my home directory and executed xyz.sh using
./xyz.sh
I got the message bash: ./xyz.sh: No such file or directory
Despite executing the following:
PATH=$PATH:home/somefolder/test/xyz.sh
$PATH
, path to your script is missing a/
at the beginning. – sebasth Sep 24 '17 at 13:08./xyz.sh
unless you’re in the directory wherexyz.sh
is located. – G-Man Says 'Reinstate Monica' Sep 24 '17 at 13:57