获取shell自身路径

来源:互联网 发布:mysql触发器的弊端 编辑:程序博客网 时间:2024/05/21 22:30

获取shell执行时,当前的路劲,不管是./dirname还是/aa/bb/dirname

DIR=$(cd "$(dirname "$0")";pwd)


0 0