What does the number 2 mean on this grep command line?
1 answer
From the grep man page:
-C NUM, -NUM , --context = NUM ββPrints NUM lines of output. Places a line containing a group separator (described in the -group separator section) between adjacent groups of matches. With -o or --only-matching, this has no effect and a warning is issued.
so it's grep -2
equivalent grep -C 2
in which grep displays 2 lines before and after the match.
+5
source to share