Chapter 10. 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 or fundamentals of awk and see 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:

  • Filtering content from files
  • Formatting output
  • Displaying non-system users from /etc/passwd
  • Using awk control files

The history behind awk

The awk command is a mainstay in the command suite in both Unix and Linux. The Unix command awk was first developed by Bell Labs in the 1970's and is named after the ...

Get Mastering Linux Shell Scripting now with O’Reilly online learning.

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