shell脚本中获取当前所在目录地址

shell脚本中获取当前所在目录如下

#!/bin/bash

work_path=$(dirname $0)
cd ${work_path} 
work_path=$(pwd) 
cd ${work_path}/src

猜你喜欢

转载自www.cnblogs.com/zhangshiwen/p/9064161.html