比如说:
QUANTUM7=/home/quantum7/test.sh
- 得到后缀sh
echo ${QUANTUM7##*.}
- 得到文件名
echo ${QUANTUM7##*/}
- 得到目录
echo ${QUANTUM7%/*}
比如说:
QUANTUM7=/home/quantum7/test.sh
echo ${QUANTUM7##*.}
echo ${QUANTUM7##*/}
echo ${QUANTUM7%/*}