I need to run a script that access a file in the same path it is located.
For example: I have the script in
/home/me/folder/script.sh, and this script will access the file
/home/me/folder/myfile. As the file is in the same path of the script, I just use the name
myfile, not the full path.
But if I run it from
it gives me:
myfile: No such file or directory
So, how can I say in the script that the file is in the same path as the script itself?