The ''yes'' and ''cat'' commands generate a series of numbered lines as example input.
is the number of records, typically lines of input, AWK has so far read, i.e. the current line number, starting at 1 for the first line of input.
is the modulo operator.
''NR % 4 == 1''
is true for the first, fifth, ninth, etc., lines of input.
Likewise, ''NR % 4 == 3'' is true for the third, seventh, eleventh, etc. , lines of input.
The range pattern is false until the first part matches, on line 1, and then remains true up to and including when the second part matches, on line 3.
It then stays false until the first part matches again on line 5.
The first part of a range pattern being constantly true, e.g. ''1'', can be used to start the range at the beginning of input.
Similarly, if the second part is constantly false, e.g. ''0'', the range continues until the end of input.
/^--cut here--$/, 0
Prints lines of input from the first line matching the regular expression ''^--cut here--$'' to the end.
===Pengiraan frekuensi perkataan===