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

Matching not as a sub-string using

The string enclosed between \y and \y should not occur as a sub-string of a word in a line. If \y is used at the beginning, it matches the empty string at the beginning. If \y used at the end, it matches the empty string at the end. For example:

$ awk '/\ystart\y/'  gopr.txt

The output on execution of the preceding code is as follows:

startstart end

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