One time I used Power BI/Power query language to generate an Ed script that contained all versions of all XML documents in a database and turn them into a Git repo.
I still like writing scripts that generate Git repos but I don't use Ed much.
I used ed for actual work decades ago, on a VT-100. My first job. We all used it until we got vi on the DECSystem-20.
When people look at ed now it seems unusable. Back in the old days we had a printed copy of the code, with line numbers. We annotated the printed copy, then made edits. That made using a line-oriented editor a lot less painful. I haven’t seen programmers looking at code on paper in a long time.
Using ed interactively, so you can work out some complex operation step by step, is a valid point for using ed instead of sed. Sometimes however, awk is the correct solution. (Why sit and mess with it, if awk provides a straight forward solution.)
I love me some sed but using that ed syntax to do anything more complex than straightforward regex substitutions makes me feel like a chimpanzee trying jam a square peg into a round hole.
vi was originally the visual-by-default run mode of ed. And EDLIN on MS-DOS (and maybe CP/M too? don't remember) was based on ed too. That's why EDLIN and vi have similar command sets.
S/Sed/Ed
(aartaka.me)51 points by thunderbong 14 November 2024 | 29 comments
Comments
Forgot the most important point there.
...the standard text editor
I still like writing scripts that generate Git repos but I don't use Ed much.
And I can't help but wonder what the license of the code in the site is.
If it isn't BSD0 or some similar attempt at preemptive public domain, what is even the point of such a thing.
0. https://rosettacode.org/wiki/Rosetta_Code
When people look at ed now it seems unusable. Back in the old days we had a printed copy of the code, with line numbers. We annotated the printed copy, then made edits. That made using a line-oriented editor a lot less painful. I haven’t seen programmers looking at code on paper in a long time.
Freudian slip? ;)