Usage of Linux grep

grep -i      # 忽略大小写
grep --color # 高亮显示
grep -v      # 反向查找
grep -o      # 只显示被模式匹配到的字符串
grep -A 1    # 匹配某行与之后的一行
grep -B 1    # 匹配某行与之前的一行
grep -C 1    # 匹配某行前后各一行

  1. License under CC BY-NC 4.0
  2. Copyright issue feedback: dig +short txt
  3. Not all the commands and scripts are tested in production environment, use at your own risk
  4. No privacy information is collected here
Buy Me a Coffee