感谢鸟哥!!!
如果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
转载于:https://www.cnblogs.com/kuaile1314/p/11529683.html
相关资源:linux系统shell正则表达式-练习工具和教材