Blog Content
Linux shell获得当前目录、上级目录、目录的最后部分
Linux-Mac
2017-08-05 14:45:49
current_path="$PWD" # 同 "`pwd`"
path=$(dirname "$PWD")
path=$(dirname $(dirname "$PWD"))
last_component=$(basename "$PWD")
上一篇:centos下修改/etc/hosts文件以及生效命令
下一篇:在Mac上删除自己安装的Python