I was a little disappointed this morning when I realized that ed, the curmudgeonly editor that technically dates back 40 years or so in *nix history, wasn’t installed by default on my Arch Linux machine.
I wasn’t surprised though; I can remember a forum debate a few years ago about whether or not it was really critical to the core packages that drew it in. It must not have passed muster, I guess. Hence my wry disappointment. π
It’s no major loss. ed is probably the least friendly, least communicative editor you’ll ever encounter … or that I have encountered, anyway.
The trick to using ed is to remember three things:
- ed works line by line. Remember that, and things make more sense.
- ed doesn’t want to give out too much information. Which makes it very Unixy.
- ed hates your guts.
Okay, that last one is a lie. ed doesn’t hate your guts.
And really, given the churlish foofaraw that surrounds it, ed actually works pretty well. It has an insert (and append) mode and a command mode, a lot like vim.
And it can do search and replace sequences, like emacs. And load and save by file name, like Notepad. And filter text, sort of like grep. And explain its cryptic “?” error messages. And a lot of other things too.
I don’t count myself as an ed expert. But I think it’s fair to say that most of the basic functions you would look for in any text editor are present in ed. They might be a little more cryptic, but no less functional.
If you want — or need — to get to know ed, I’d start on the linuxquestions.org wiki, which does a good job setting up your basics, and the man page for ed, which handles some more complicated functions.
Get through that, and you’ll realize ed really doesn’t hate anybody. It just takes a little getting to know it. π
Guess ed was abandoned from most distributions because with vi(m) installed, there is ex, which is compatible with ed. In fact, ex was heavily influenced by ed as long ago as the 70s, and eventually became vi. I had to deal with ed for years in the late 80s. Helped a lot with learning vi π
I found it interesting that Wikipedia cites Ken Thompson as the original author of ed and the progenitor of the Unix philosophy. … I can see how they relate. …
I’ll just leave this here:
http://www.gnu.org/fun/jokes/ed-msg.html
Emacs for life.
Pingback: edbrowse: Be afraid. Be very afraid | Inconsolation
Pingback: 5 Text Editors: Valuable for Web Developers | shameem
Pingback: fdisk: | Inconsolation
Pingback: gtypist: Yes, I know I’m a failure | Inconsolation
Pingback: vi and ex: As required by law or custom | Inconsolation
Pingback: ired: Unenthusiastic, as might be expected | Inconsolation
Pingback: ired: Unenthusiastic, as might be expected | Linux Admins