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

Working with one-liners for text processing and pattern matching with AWK

AWK is the best tool for breaking data into smaller chunks to make it suitable for input to other applications, or for manipulation. We can write complex scripts using AWK that can run into 100s or even 1,000s of lines, but for system administrators, most of the time, use of AWK is limited to relatively short scripts, and one-liners are best suited to the command line to give the desired output.

A one-liner is an AWK program consisting of a sequence of pattern-action statements in a single line. They are very useful in performing day-to-day file processing. They help in breaking down large files into chunks of information. These one-liners are often combined with a ...

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