Hour 17. Filtering Text with awk
In Chapter 16, “Filtering Text with Regular Expressions,” you learned how to use regular expressions with sed to filter text. In this chapter, you will look at another powerful text filtering program called awk.
awk is a program and a complete programming language that enables you to search many files for patterns and to conditionally modify files without having to worry about opening files, reading lines, or closing files. It's found on all UNIX systems and is quite fast, easy to learn, and extremely flexible. This chapter concentrates on the awk elements that are most commonly used in shell scripts, specifically:
Get Sams Teach Yourself Shell Programming in 24 Hours, Second Edition 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.