shell 脚本if使用的坑
摘要:shell脚本对空格的要求特别严格 一、截取文件名和后缀 file=”thisfile.txt” echo “filename: ${file%.*}” #打印文件名 echo “extension: ${file##*.}” #打印文件后缀 二、if判断 suffix=${file##*.} if
阅读全文
posted @ 2021-06-09 19:08
posted @ 2021-06-09 19:08