Linux中 sed命令忽略大小写匹配

 

001、

[root@localhost test]# ls
a.txt
[root@localhost test]# cat a.txt             ## 测试数据
22 abc44 88
32 ABC11 43
14 aBc44 86
[root@localhost test]# sed -n '/abc/p' a.txt    ## 匹配abc
22 abc44 88
[root@localhost test]# sed -n '/abc/Ip' a.txt    ## 利用大写字母I,忽略大小写匹配
22 abc44 88
32 ABC11 43
14 aBc44 86

image

。 

 

posted @ 2025-09-18 21:11  小鲨鱼2018  阅读(9)  评论(0)    收藏  举报