linux--grep

grep--Global search Regular Expression and Print out the line的简称,即汉语的意思是 全面搜索正则表达式并且打印出来。

grep的一般格式是

               grep      选项                   模式         文件

[meng@localhost shellCommand]$ grep          -n         "boy"     grepTest1.txt   grepTest2.txt 
结果:                                    grepTest1.txt:1:i am a boy
原文地址:https://www.cnblogs.com/sirwang/p/6414591.html