BASH script, get the script directory
Posted on 2012-09-02
I am running a shell script from within another shell script. They are in different directories and wanted to know the best way to get the current directory that the sub shell script is running from.
I've tried using:
But those show the location of the original shell script. Every command seems to act as if it is in the original shell script.
I am calling the second shell script from the first using the '.' dot command. Any advice is appreciated.