junjie 通过本文主要向大家介绍了shell扩展未正确安装,shell扩展,windows shell扩展,shell例子,shell脚本例子等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
basename example.tar.gz .tar.gz
# => example
FILE="example.tar.gz"
echo "${FILE%%.*}"
# => example
echo "${FILE%.*}"
# => example.tar
echo "${FILE#*.}"
# => tar.gz
echo "${FILE##*.}"
# => gz
# 在bash中可以这么写
filename=$(basename "$fullfile")
extension="${filename##*.}"
filename="${filename%.*}"
</div>
</div>

