I\'m writing a shell script which parses the path of the current working directory (printing a like of all basenames above the current directory).
So far, I\'ve been usi
If you know that bash is available and the script is executed with it, PWD is safe.
PWD
If, on some systems, only plain sh is available, use pwd.
pwd