在linux shell编写过程中,会经常性碰到case in条件语句,用法请参考http://c.biancheng.net/view/2767.html
大部分介绍文章里都说条件pattern可以是数字、字符串、正则表达式,具体如下图
那么“s0x”这种算字符串算正则还是什么?
根据测试,“s0x” shell它不认识,也即case in中pattern字符串中间不要有数字出现,不然就没然后了,让你一脸懵。
在linux shell编写过程中,会经常性碰到case in条件语句,用法请参考http://c.biancheng.net/view/2767.html
大部分介绍文章里都说条件pattern可以是数字、字符串、正则表达式,具体如下图
那么“s0x”这种算字符串算正则还是什么?
根据测试,“s0x” shell它不认识,也即case in中pattern字符串中间不要有数字出现,不然就没然后了,让你一脸懵。