Extracting and displaying data with awk: Cheat sheet download

Extracting and displaying data with awk

Get our awk cheat sheet.

Brain and data illustration
Image by : 
Opensource.com
x

Subscribe now

Get the highlights in your inbox every week.

If you need to extract data from files, or simply display data in a new way, you need a script. AWK is a scripting language that does exactly that in a straightforward way. AWK (usually written as just "awk") originates from the 1970s and has become a standard feature on any Unix system. Named after its inventors—Aho, Weinberger, and Kernighan—awk can tackle most jobs that you throw at it.

GNU awk ("gawk") is the free software version of awk. It's pretty easy to write scripts using gawk to grab data from text files and transform that data for use elsewhere. Gawk scripts can use regular expressions or other patterns to select data and use a host of standard functions to manipulate data and print output.

Use this handy cheat sheet to quickly reference most of gawk's features. There's more to gawk than can fit in one cheat sheet, but this shows the most commonly used features. To learn more about gawk, view the gawk manual page on your system (man gawk) or visit the GNU Awk User’s Guide

DOWNLOAD NOW

About the author

photo of Jim Hall
Jim Hall - Jim Hall is an open source software advocate and developer, probably best known as the founder of FreeDOS. Jim is also very active in usability testing for open source software projects like GNOME. At work, Jim is CEO of IT Mentor Group, an IT executive consulting company that helps CIOs and IT Leaders with strategic planning and organizational development.