Cover of sed & awk

sed & awk

sed & awkdescribes two text processing programs that are mainstays of the UNIX programmer's toolbox.

sedis 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 sedis substitution, replacing one block of text with another.

Read more

awkis a complete programming language. Unlike many conventional languages, awkis "data driven" — you specify what kind of data you are interested in and the operations to be performed when that data is found. awkdoes many things for you, including automatically opening and closing data files, reading records, breaking the records up into fields, and counting the records. While awkprovides the features of most conventional programming languages, it also includes some unconventional features, such as extended regular expression matching and associative arrays. sed & awkdescribes both programs in detail and includes a chapter of example sedand awkscripts.

This edition covers features of sedand awkthat are mandated by the POSIX standard. This most notably affects awk, where POSIX standardized a new variable, CONVFMT, and new functions, toupper() and tolower(). The CONVFMT variable specifies the conversion format to use when converting numbers to strings (awkused to use OFMT for this purpose). The toupper() and tolower() functions each take a (presumably mixed case) string argument and return a new version of the string with all letters translated to the corresponding case.

In addition, this edition covers GNU sed, newly available since the first edition. It also updates the first edition coverage of Bell Labs nawkand GNU awk(gawk), covers mawk, an additional freely available implementation of awk, and briefly discusses three commercial versions of awk, MKS awk, Thompson Automation awk(tawk), and Videosoft (VSAwk).

Audience
adult
Length
long · 434 pages

Click a tag to see books like this one that share it. Point at it (on a phone, tap it) for less of it instead.

Read it? Sign in to help tag it.

Liked sed & awk? Here’s where I’d start.

These suit anyone who liked sed & awk. Sign in and mark a few books for picks shaped around your own taste.

  1. Learning the bash Shell Shares programming, technical, computers
  2. Mastering Regular Expressions Shares programming, technical, computer
  3. Learning GNU Emacs Shares programming, computers, computer science
  4. Lex & Yacc Shares programming, computers, computer science

“People who read sed & awk tend to reach for these next.”

  1. Perl Cookbook
  2. Essential System Administration: Tools and Techniques for Linux and Unix Administration
  3. Bash Cookbook: Solutions and Examples for Bash Users
  4. Learning Perl

“If you want more of the same (science about technology), start with these.”

  1. Object-Oriented JavaScript
  2. Head First Networking
  3. Quantum Computing for Everyone
  4. Sams Teach Yourself Regular Expressions in 10 Minutes

“If it was the programming that hooked you, try one of these.”

  1. Advanced Programming in the UNIX Environment
  2. The UNIX Programming Environment
  3. The Art of UNIX Programming
  4. The C Programming Language

“These start from a similar idea, even if they go somewhere else with it.”

  1. The AWK Programming Language
  2. Programming in C
  3. Head First Programming: A Learner's Guide to Programming Using the Python Language
  4. Jumping into C++