[Linux] 获取Shell脚本自身所在位置的绝对路径; #!/bin/bash oldwd=$(pwd) rl_self=$(readlink -f $0) dir_self=$(dirname $rl_self) echo "" echo "directory self is $dir_self" ------------ 微博:http://weibo.com/scue Github:http://github.com/scue