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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.