The sed version is more keystrokes. Is ENTER so much more costly?
ktm5j@kurma /pool/share/pkgs $ ed ~/.ssh/known_hosts
130923
398d
wq
130755
Sed just quietly does what I want. Like I said, just another way to skin a cat, do whatever works for you.Also, btw, you can absolutely use ed in scripts [0], but this is also something that I would pity the maintainer of.
[0] https://www.ibm.com/developerworks/community/blogs/brian/ent...