sed & awk (2nd Edition) [Paperback]
Dale Dougherty (Author), Arnold Robbins (Author)
sed & awk describes two text processing programs that are mainstays of the UNIX programmer’s toolbox.
sed is a “stream editor” for editing streams of text that might be too large to edit as a single file, or that might be generated on the fly as part of a larger data processing step. The most common operation done with sed is substitution, replacing one block of text with another.
awk is a complete programming language. Unlike many conventional languages, awk is “data driven” — you specify what kind of data you are interested in and the operations to be performed when that data is found.