Sed one-liners

A few weeks ago I reviewed Peteris Krumins’ book Awk One-Liners Explained. This post looks at his sequel, Sed One-Liners Explained.

The format of both books is the same: one-line scripts followed by detailed commentary. However, the sed book takes more effort to read because the content is more subtle. The awk book covers the most basic features of awk, but the sed book goes into the more advanced features of sed.

Sed One-Liners Explained provides clear explanations of features I found hard to understand from reading the sed documentation. If you want to learn sed in depth, this is a great book. But you may not want to learn sed in depth; the oldest and simplest parts of sed offer the greatest return on time invested. Since the book is organized by task — line numbering, selective printing, etc — rather than by language feature, the advanced and basic features are mingled.

On the other hand, there are two appendicesĀ  organized by language feature. Depending on your learning style, you may want to read the appendices first or jump into the examples and refer to the appendices only as needed.

For a sample of the book, see the table of contents, preface, and first chapter here.

Related links

5 thoughts on “Sed one-liners

  1. This post is a good example of why this is one of the best blogs on the internet (yes, including my own :) It includes actual thinking, in this case a thought out review, understanding that the reader may not be the same in style / taste as the writer.

    I should add that due to it’s content, it is probably one of the less read blogs on the internet, but really, who cares? On that road lies a race to the bottom.

  2. Thanks, Super Cholo. This blog has a good number of readers, but it might have more if I wrote about cats, online marketing, and weight loss secrets.

Comments are closed.