AWK Fundamentals

The stream editor is not alone in its family and has a big brother, AWK. In this chapter, we will run through the basics of AWK and explore the power of the AWK programming language. We will learn why we need and love AWK and how we can make use of some of the basic features before we start putting AWK to practical use in the next two chapters. As we work our way through this, we will cover the following topics:

  • The history behind AWK
  • Displaying and filtering content from files
  • AWK variables
  • Conditional statements
  • Formatting output
  • Further filtering to display users by UID
  • AWK control files

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.