by kleff · 9y ago · 0 comments
pwd -P
all the time to get the real full path (no symlinks) of the current directory. Really easy to remember as well, Print Working Directory.You could use this to get the current location of the script being run (not the location where it runs).
readlink -f $0