---

Linuxtopia: Awk Learn-to

[ Thanks to Dave for this link. ]

“This document exists to educate the reader about awk….Before
using this document, the reader should be familiar with basic Linux
commands.”

Awk is a scripting language for Unix/Linux systems. It has
a GNU counterpart, called gawk, which is fully compatible with awk.
Awk is very useful for parsing text files, and it can also be used
to simplify maintenance tasks.
It can read either from a file
or from standard input. The general idea of awk is that it takes
the input line by line, checks it for a specified test, and
performs certain operations on the lines where the test evaluates
to true. These tests can either be string- matching (with regular
expressions) or mathmatical (A<B). Awk also takes each field of
the line, and seperates it into a series of variables named $1, $2,
etc… A field is any text seperated by a space. The $0 variable
signifies the entire line.”

Complete
Story

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis