I have a bash script file, which is put under some directory added to $PATH so that I can call the script from any directory.
There is another text file under the same directory as the script. I wonder how to refer to the text file in the script?
For example, if the script is just to output the content of the text file, cat textfile
won't work, since when calling the script from a different directory, the text file is not found.