O'Reilly logo

Learning AWK Programming by Shiwang Kalkhanda

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A single number followed by a comma in brackets

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required