Shell 字符串處理、獲取文件名和後綴名

【http://www.lichaozheng.info/2012/03/20/shell-獲取文件名和後綴名/】 代碼: file=」thisfile.txt」 echo 「filename: ${file%.*}」 echo 「extension: ${file##*.}」 輸出: filename: thisfile extension: txt 附: Bash字符串處理 基於Pattern
相關文章
相關標籤/搜索