[TUHS] screen editors

Theodore Y. Ts'o tytso at mit.edu
Sat Jan 11 01:58:22 AEST 2020


On Fri, Jan 10, 2020 at 09:13:04AM +0100, markus schnalke wrote:
> 
> I was quite shocked when I first realized that I had to do
> `apt-get install ed' to have it available ... on a Unix-like
> system. But on the other hand, who of today's users is even
> capable of exiting it?!

For what it's worth, I regularly edit configuration files and shell
scripts using /bin/ed in environments where I can't use (due to
terminal limitations) or can't fit a more sophisticated editors.
These days this is typically in small appliance VM's.

I've also been known to do things like this in shell scripts[1]:

ed /etc/lighttpd/lighttpd.conf <<EOF
/^server.document-root/s/^/#/p
/^index-file.names/s/^/#/p
/^include_shell.*create-mime/s/^/#/p
w
q
EOF

[1] https://github.com/tytso/xfstests-bld/blob/master/kvm-xfstests/test-appliance/gce-xfstests-bld.sh

And for years, I knew how to exit ed and emacs, but had trouble
exiting vi.  :-)

					- Ted
					




> 
> 
> On my own systems I like to install Heirlomm ed, which I have
> outfactored from the Heirloom tools package. If you want to
> actually use it every now and then, Gunnar's ed is much more
> usable than GNU ed ... which seems to be more a demonstration
> object than actually a programmer's editor.
> 
> 
> Anyways, I'm having a great pleasure reading those historic
> spotlights on editors these days. :-)
> 
> 
> meillo


More information about the TUHS mailing list