So when coding a bash/sh script I got a path in a variable with the following content:
$SOMEPATH=/usr/lib64/pkgconfig/../..
How can I convert $SOMEVAR to a full absolute path that converts the ".." folders to this value?:
$SOMEFULLPATH=/usr
Thanks