I am writing a script to set environment variables on linux 2.6 using bash. So the script contains commands like:
export SRC_DIR=.. export LIBPATH=${SRC_DIR}/lib
Digging up this old thread to add what i've found to work nicely:
export SRC_DIR = `realpath ..`
see more information here:
http://man7.org/linux/man-pages/man3/realpath.3.html