Sfoglia il codice sorgente

grep: add line number

Antonio 9 anni fa
parent
commit
b0adce01cb
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  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}}`