浏览代码

grep: add line number

Antonio 9 年之前
父节点
当前提交
b0adce01cb
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      pages/common/grep.md

+ 4 - 0
pages/common/grep.md

@@ -23,6 +23,10 @@
 
 `grep -c {{something}} {{file_path}}`
 
+- print line number for each match
+
+`grep -n {{something}} {{file_path}}`
+
 - use the standard input instead of a file
 
 `cat {{file_path}} | grep {{something}}`