Working with awk

In this section, we will show you what the command awk is all about and why it can be important for us. We will also show you how to use it for text file manipulation and processing. awk is another very important tool for text processing and manipulation. It can be used as a complete scripting language to work on text files or streams. It contains some very powerful programming constructs, including variables: if...else, while, do while and for loops; arrays; functions; and mathematical operations. awk also works on a line-by-line basis, as sed does. One of the key features of awk and the main difference to sed is that it splits input lines into fields automatically. But how does it work and why is it so helpful?

awk enables ...

Get Fundamentals of Linux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.