去除路径中最后一个'/'符号
test_full_path=$(echo ${test_full_path%*/})
获取最后一个'/'符号之前信息
test_path=${test_full_path##*/}
获取最后一个'/'符号之后信息
test_name=${test_full_path%/*}
去除路径中最后一个'/'符号
test_full_path=$(echo ${test_full_path%*/})
获取最后一个'/'符号之前信息
test_path=${test_full_path##*/}
获取最后一个'/'符号之后信息
test_name=${test_full_path%/*}
本文标题:shell 路径中最后一个'/'符号处理
本文链接:https://www.haomeiwen.com/subject/dtukictx.html
网友评论