if you need the absolute path of the script you are running at the moment:
absPath=`echo -n \`pwd\` ;( [ \`dirname \$0\` == '.' ] && echo ) || echo "/\`dirname \$0\`"`
for example useful to build up libary paths in project folders.
get absolute path of a script
July 21, 2008
2 Comments |
Bash | Tagged: absolute, Bash, lib, libary, path, script |
Permalink
Posted by 666hellrid3r