Tutorial by Examples

Usually grep prints only matching lines. In the example below seq 9 generates a list of numbers from 1 to 9, one per line, and grep prints a single matching line: seq 9 | grep 5 # 5 The -C n option (or --context=n in long form) prints n lines before and after each matching line, in addition to ...

Page 1 of 1