linux expr 判断字符串是不是以什么结尾

expr "aaa.txt" : ".*\.txt"   #正确就返回字符串长度,错误就为0

posted @ 2020-12-17 00:21  赵向上  阅读(435)  评论(0)    收藏  举报