March 2018
Beginner to intermediate
416 pages
9h 24m
English
A single number followed by a comma in brackets, {n,}, means that the preceded regular expression is repeated at least n number of times. For example, to match the occurrence of the minimum 3 numbers between a and b in a line, we can use the following:
$ awk '/a[0-9]{3,}b/' interval_regex.txt
The output on execution of the preceding code is as follows:
a123ba1234ba12345ba1233456ba111ba111111b
Read now
Unlock full access