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.
By coincidence, I also blogged about one-liners today. Summary: I don’t usually like them. http://community.amstat.org/AMSTAT/Blogs/BlogViewer/?BlogKey=9b18af5f-e28b-4cc1-a5bc-55d85c3af1e2
And since you didn’t link to your own one-liner post, I’ll do it for you:
http://www.johndcook.com/blog/2011/03/15/a-support-one-liner/
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.
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.
Thanks for posting the review!
I was in love with Sed one-liners, until I found out that you could put multiple lines of sed in one file. I haven’t looked back since!
http://www.grymoire.com/Unix/Sed.html
It’s the new black, you’ll love it.