I'm finally writing a post on the ed command. And I'm keeping it short so that I'll actually publish the post. The examples presented below will be easier to understand for those already familiar with Vim and sed. See the links at the end for learning resources.