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

 

posted @ 2017-02-19 00:08  charmtool  阅读(136)  评论(0编辑  收藏  举报