Saturday, September 10, 2016

AWK & grep: Comparison and Similarity

Command:

$ seq 1 10


Result:

1
2
3
4
5
6
7
8
9
10


Command:

$ seq 1 10 | grep '1'


Result:

1
10


Command:

$ seq 1 10 | awk '/1/'


Result:

1
10