I am trying to write a script to update $PATH. Instead of hard coding the paths into the script itself I want to dynamically do this by capturing the full file path of the script itself.
I.e /loc1/loc2/loc3/modifypath.sh. instead of going export PATH="$PATH:/loc1/loc2/loc3" I want to extract the full file path from the script call into a variable to add to $PATH. That way no matter where the script is located it will modify $PATH with the location where it is.
Linux Red Hat Enterprise 5.3
October 1, 2010 3:25 PM
October 1, 2010 6:49 PM