sed & awk

by Dale Dougherty (Author), Arnold Robbins (Author)

On This Page

Description

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 show more specify what kind of data you are interested in and show less

Tags

Recommendations

Member Reviews

4 reviews
I don't know -- this could just be an impression, and a mistaken one at that, but it seems to me that back when O'Reilly was one of a few big tech publishers, their books were better written and had more character.

This is one of those. sed and awk are two -- at this point -- almost primordial UNIX tools. Perl was famously started by Larry Wall when he was working on a tough problem and, as I think he put it, "awk ran out of steam."

I use awk at work but only in a very limited way, and am interested to know more. I've only used sed rarely but feel like I "get the idea" ... but I also know that entire applications have been written in sed (a sokoban game, for one) so there's obviously more to know.
I read this curious to see if I'd use either to replace Perl or Python in my workflow. SED I can definitely see using for quick one off edits. AWK, especially in light of the longer examples given later in this book, I don't see using. AWK is worth learning a bit about for its approach.

I used the 1997 second edition. Some of the examples are a bit dated. The prose is more readable than some by this publisher.
Sed and awk are Unix power tools. Actually Awk is more of a programming language. This book is a good tutorial on both tools. Apparently it is one of the most popular books on the subject.
SED stands for "Stream Editor." I wish that I had discovered this tool years before I did, but had been discouraged by the daunting vocabulary of rigorous descriptions. SED was originally written for the UNIX operating system but has been ported to MSDOS by Eric S. Raymond. You can do fairly sophisticated extraction from or modification of text files with remarkably terse (if highly cryptic-looking) instructions. (Actually, for merely searching or extracting, the "Grep" tool is even better, but DOS versions that I have seen do not conform so well to the UNIX standard tool.)
This book is a patient exposition of the program's capabilities that takes the reader from the simplest examples.

The Awk language, which adds much to the editing show more powers of SED, has probably been largely superseded by Perl, which is much more powerful still. However, the Awk interpreter is small and compact, compared to modern Perl implementations which have become large and elaborate. Shell scripts in Linux call upon it frequently.

Regular expressions in Grep, SED, Awk, and Perl (respectively) differ in detail from one another. If I have any criticism of this book, it would be that it sometimes discusses SED and Awk together without pointing out once again these differences if a reader has forgotten them. This sometimes makes the book confusing as a reference.
show less

Members

Recently Added By

Author Information

Picture of author.
Author
32+ Works 1,584 Members
Picture of author.
Author
28 Works 3,610 Members

Series

Belongs to Publisher Series

Common Knowledge

Canonical title
sed & awk
Original publication date
1990
People/Characters
Loris (cover animal)
First words
This book is about a set of uncommonly named UNIX utilities, sed and awk.
Quotations
To write an awk script, you must become familiar with the rules of the game.
Last words
(Click to show. Warning: May contain spoilers.)write flag, 84
Publisher's editor
O'Reilly, Tim

Classifications

Genres
Technology, Nonfiction, General Nonfiction
DDC/MDS
005.43Computer science, information & general worksComputer science, knowledge & systemsArtificial Intelligence/Virtual RealitySystems programming and programsSystems programs
LCC
QA76.76 .U84 .D69ScienceMathematicsMathematicsInstruments and machinesCalculating machinesElectronic computers. Computer scienceComputer software
BISAC

Statistics

Members
867
Popularity
31,215
Reviews
4
Rating
½ (3.71)
Languages
English, French, Japanese
Media
Paper, Ebook
ISBNs
8
UPCs
2
ASINs
5