现在的位置: 首页 > 综合 > 正文

Bash 脚本小片段

2013年09月10日 ⁄ 综合 ⁄ 共 105字 ⁄ 字号 评论关闭

判断名字以.exe 结尾

dirNoSlash='test.app'
if [[ ! ${dirNoSlash} =~ "\.app{1}" ]]                                                              
then                                                                                            
    echo "dir $dirNoSlash not ends with .app"
fi

抱歉!评论已关闭.