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 whitespaces

Matches the opposite of \s, that is, anything that is not considered whitespace. It is the equivalent of [^[:space:]]. For example, if we want to print all the lines that don't contain any whitespace between e and d, then we can use the \S shorthand, as follows:

$ awk '/e\Sd/' gopr.txt

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

start endende_de1de;deNd

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