This question already has an answer here:
-
*
/questions/4045253/converting-relative-path-into-absolute-path
/questions/4045253/converting-relative-path-into-absolute-path
6 answers
Answers
Changing to the directory seems to be a straightforward approach:
echo "$(cd "${directory}"; pwd)"
Source
License : cc by-sa 3.0
http://stackoverflow.com/questions/30167350/how-can-i-get-the-full-path-of-a-relative-directory-in-bash