Chapter 9. Introducing awk

If you want to format reports or extract chunks of data from large text files then awk will do the job. It is perfect for text scanning and manipulating data.

From my experience of all the shell filtering tools awk is the most difficult to master in its entirety. I do not know why, maybe it’s to do with its syntax, or its not very meaningful error messages. You’ll get to know the ‘ Bailing out ’ and ‘ awk: cmd. line: ’ error messages quite well as you progress through the awk language. That’s right, awk language: awk is a programming language all on its own. You may be wondering why I have included awk in a shell book. Good question, so here’s the good answer. Awk by itself may be a demon to learn, but using awk in ...

Get Linux and Unix Shell Programming 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.