Usage of Linux grep
grep -i # 忽略大小写
grep --color # 高亮显示
grep -v # 反向查找
grep -o # 只显示被模式匹配到的字符串
grep -A 1 # 匹配某行与之后的一行
grep -B 1 # 匹配某行与之前的一行
grep -C 1 # 匹配某行前后各一行
Disclaimer
- License under
CC BY-NC 4.0
- Copyright issue feedback
me#imzye.me
, replace # with @ - Not all the commands and scripts are tested in production environment, use at your own risk
- No privacy information is collected here