I considered using "ed" in a script to massage an upstream package into shape during installation this past week, but decided not to because ed is not part of the default Debian installation.
I think it is worth considering why ed is part of the POSIX standard to this day in determining whether or not it should have priority "important" and be included in the base installation. The very first sentence of the "DESCRIPTION" portion of the BSD 4.2 man page (1980s vintage) for ed says: "_Ed_ is the standard text editor." Historically, ed was the only text editor available on a bare-bones Unix system booting from a minimal kernel before a customized kernel had been configured and built, with video drivers, etc., to support video monitors. Most processors today are not connected to video monitors; most processors are part of embedded systems. When bringing up such a system initially, you typically just have a power supply, the processor chip, some flash memory that contains a minimal bootloader, a serial console port on the processor's UART pins, and maybe a JTAG port. This bug report has mentioned vi(m) and sed as possible replacements. Neither are proper interactive single-line editors designed to work over a serial line, and GNU sed is more powerful than other sed implementations, and vi(m) is not suitable for operation within a shell script. Embedded systems are not going to be reporting their usage for popcon statistics either, so a poor popcon showing can be misleading. The Debian source package is about 1 Mbyte, almost half of which is testsuite data, but the upstream tarball is less than 70 kilobytes. Is Debian so constrained for space on its ISO images that it is not possible to shoehorn in a copy of ed in the base installation? I know that the package priority is up to the FTP Masters and not up to any of us. I just mention the above as input for the ed maintainer to discuss with the FTP Masters if so desired. Thank you, Paul Hardy