A Practical Guide to Sed

Yesterday, I wrote about Liran B. H’s Practical AWK Guide. He has a similar guide for sed called Understanding sed – Practical Guide. Like the Practical AWK post, it illustrates some of sed’s power by showing a few sed one-liners.

Sed is, in principle, pretty simple—especially if you’re familiar with Vi/Vim colon commands—but in practice it can be tricky to get its use exactly right. That’s the real value, I think, of guides like this: it serves to remind us of the basic form of the commands and some of the common tasks it’s used to perform.

If you like the command and want more, the best “quick” guide that I know of is this one. Sadly, tools like sed (and even awk) aren’t used as much these days. It’s sad because they’re powerful tools that often provide a much faster and easier way to accomplish certain tasks than the tools that have replaced them.

This entry was posted in General and tagged . Bookmark the permalink.