Ed Is The Standard Text Editor for Unix/Linux

What the title states is not at all obvious these days, and yet if you look at the man page for ed, it says (and I quote the following): “ed is the ‘standard’ text editor in the sense that it is the original editor for Unix, and thus widely available. For most purposes, however, it is superseded by full-screen editors such as GNU Emacs or GNU Moe.”

Distro Tube writes about this one and even mentions two options I did not know existed: the -p command option to set a prompt, and the :H directive to generate errors in addition to the super terse ?

I checked it out and indeed ed -p “:” thoughts.txt
brings up my file called thoughts.txt and returns a : prompt.

An illegal command generates “Unknown command” if I feed it a b, which is not an ed command. If I say 4000 and my file is not 4000 or more lines long, with the : prompt and the H command implemented, I get the response: “Invalid address”. Before today I did not realize either of these capabilities!

Ed Is the Standard Text Editor for Unix/Linux

2 Likes

I have never heard or seen any indication of the existence of that editor. It may be arrogant on my part, but even after reading the description at Savannah, I feel confident in saying that I can quickly forget about it and not worry of consequences. :slight_smile:



ed is so stripped down, similar to the old MS-DOS EDIT that, for me, it is useless. Yes, I am aware that there are some “use cases” where such a “line editor” is required but, except for back in 1986, I have not come across a single such instance since then!

I will stick to good old vi/GVim, thank you!

:slight_smile: