3 ms·
The sed version is more keystrokes. Is ENTER so much more costly?
by firethief 8y ago
The sed version is more keystrokes. Is ENTER so much more costly?
- YaxelPerez 8y agoYou can put the sed version in a cron job
- falcor84 8y agoI suppose that's not what you meant, but I cannot stop thinking of the poor sysadmin whose files keep getting unexpectedly trimmed to exactly 397 lines. 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/entry/ed_editor https://www.ibm.com/developerworks/community/blogs/brian/ent...
- ktm5j 8y agoMore keystrokes, but fewer lines of terminal output. Why have 5 lines of output when I don't want any? 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.
- lokedhs 8y agoYou can use the -s flag to avoid two of those lines of ed output.