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!