Refer to te current directory in a shell script
- by One Two Three
How do I refer to the current directory in a shell script
So I have this script which calls another script in the same directory
#! /bin/sh
#Call the other script
./foo.sh
# do something ...
For this I got ./foo.sh: No such file or directory
So I changed it to:
#! /bin/sh
#Call the other script
foo.sh
# do something ...
But this would call the foo script which is, by default, in the PATH. This is not what I want.
So the question is, what's the syntax of doing './` in a shell script?