60

grep介绍-13372947-51CTO博客

 6 years ago
source link: http://blog.51cto.com/13382947/2066660
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
一、grep命令语法:grep[-cinvABC]‘word’filename-c:打印符合要求的行数-i:忽略大小写-n:在输出符合要求的行的同时连同行号一起输出-v:打印不符合要求的行-A:后跟一个数字(有无空格都可以),例如–A2则表示打印符合要求的行以及下面两行-B:后跟一个数字,例如–B2则表示打印符合要求的行以及上面两行-C:后跟一个数字,例如–C2则表示打印符合要求的行以及上下各两行

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK