linux 基础正则表达式练习

  感谢鸟哥!!!

 

如果Linux能够直接连网络,使用以下命令还获取文件吧

wget http://linux.vbird.org/linux_basic/0330regularex/regular_express.txt

接着查看文件内容,有22行。

 

 

 

一、查找特定字符串

1.查找特定字符串the,区分大小写 -n:顺序输出行号

grep -n 'the' regular_express.txt

 

 

 2.查找字符串the,不区分大小写

grep -in 'the' regular_express.txt 

 

posted @ 2019-09-16 20:23  -Zad-  阅读(700)  评论(0编辑  收藏  举报
jQuery火箭图标返回顶部代码