The Ed Editor

Kay Lack has an interesting video on the ed editor. As the cognoscenti know, ed is the standard Unix editor, even though virtually no one uses it anymore. The reason for that is that ed was designed for teletypewriters and is therefore line oriented. That means that from the modern perspective, ed is user hostile. You can’t address individual characters or easily change the content of a line. Almost all operations work at the line level.

Of course, all this makes sense in the context of TTYs. They were slow—really slow—as they typed out what we today would consider the display. It just didn’t make sense to type out a multiline program. make a change, and type it out again. Indeed, the primary concern was typng as little as possible to prevent wasting time.

Lack explains all this and take us through the history of the editor. My only complaint is that she repeatedly refers to it as “ed” rather than “E D”, it’s actual name. Of course, hardly anyone remembers this anymore so it’s a small thing.

If you’re interested in the history of ed and why it’s the way it’s is, take a look at Lack’s video.

There still exists the notion that serious developers should know ed in case they experience boot problems, need to change a configuration file, but their normal editor isn’t available. Ed lives in /bin so it will almost always be available unless there are serious hardware problems. That may still be true in Linux or *BSD based systems but probably isn’t in macOS.

Nonetheless, I still maintain a reasonable facility with ed just in case. It is, after all, the standard Unix editor.

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