If you haven’t used sed before, you’re missing a powerful jewel, a fast and useful tool. First, a confession. Before writing the column this chapter is based on, I had never used it. I wasn’t even sure what it did.
Sed is the GNU Stream Editor. Remember streams, the data in motion we talked about in Chapter 5, “Everything’s a File?” One way to look at sed is to think of the data to be edited being passed by the editor, instead of the other way around.
And that only happens one time, it goes by sed from top to bottom, start to finish. Sed acts on the data once, as it passes by.
Let’s use the following old paragraph of text for our examples throughout the column. Here it is as we found it in a dusty old archive. ...