On Mon, Dec 12, 2022 at 05:21:29PM +1100, Les Kitchen wrote: > I too will put in a good word for good old ed. I wrote most of my Ph.D. > thesis using ed through a dial-up acoustic modem, but that was a long time > ago.
ed is awful for interactive use but very useful for scripted use (e.g. with printf as in my previous message). ex is even better. > Since then, I've used it for system rescue when no other editor was > available. It's better than nothing if that's all you've got. better than the even more minimalist `cat > filename` too. These days, though, disk space isn't much of an issue even for rescue disks or an initramfs - it's rare not to have at least a minimal vi available (nvi or elvis or similar). maybe even vim. Or nano which (as much as I dislike it and other-editors-which-aren't-vi) is better for interactive use than ed. > And before ssh-keygen got the -R option, ed was the quickest and most > convenient way to remove offending host lines from my ssh known_hosts file > by something like: > > ed ~/.ssh/known_hosts > 140d > wq > > That is, delete line 140, write and quit. or automate it with: printf '%s\n' 140 d w q | ed ~/.ssh/known_hosts craig _______________________________________________ luv-main mailing list -- [email protected] To unsubscribe send an email to [email protected]
