I am running a shell script on bash in linux. I want to the get absolute path to the parent directory of the folder where my script is located.
Following gives me the path to where my script is located
SCRIPTHOME="$( cd "$(dirname "$0")" ; pwd -P )"
Thanks to the answer in following discussion:
Reliable way for a Bash script to get the full path to itself
Question:
What should I change in SCRIPTHOME="$( cd "$(dirname "$0")" ; pwd -P )"
to get the parent directory of the folder where my script is located?