Linux之grep指令

grep过滤查找,管道符:"|",表示将前一个命令的处理结果输出传递给后面的命令处理

-n 显示行号,-i忽略大小写
查找hello.txt中的yes
cat hello.tex | grep yes
显示行号
cat hello.tex | grep -n yes
显示行号并且忽略daxiaoxie
cat hello.txt | grep -ni yes

发布了48 篇原创文章 · 获赞 0 · 访问量 282

猜你喜欢

转载自blog.csdn.net/qq_44971387/article/details/105329839
今日推荐