Summary

I am hoping that you have a better and clearer understanding of what you can use the awk tool for. This is a data-processing tool that runs through text files, line by line, and processes the code you add. The main block is run for each line that matches the row criteria, if it has been added. Whereas, the BEGIN and END block code is executed just once.

In the next two chapters, we will continue working with awk and some practical examples of how awk is used in real life.

Get Mastering Linux Shell Scripting 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.