Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What better alternatives are there?

Even if you prefer vi for interactive edits, I still prefer ed for small edits.

Then there are times when your terminal is borken (or as somebody mentioned, perhaps even your keyboard is broken), this still happens more often than you think.

Recently I had to use some ajax-term thing which was just awful and completely unable to run vi properly for who knows what reason, anything that depends on curses can not be considered reliable.

But more importantly it is the standard and portable tool for scripting the editing of files.



I'm honestly curious - what's a use case for scripting the editing of files that's not better satisfied by using a scripting language? I see the value of Arch's focus on minimalism more than keeping ed around in this case, but I'm happy to be wrong.

If your terminal is broken, there are plenty of ways (reset, stty sane, whatever) to fix that. I'm also not sure why having an extra binary on my system is a good safety guard against a broken keyboard.

The ajax term case is valid I guess, though I'm not sure how common that is. I was in a case like that a year or so ago and ended up using cat and sed to get the thing back on the network.


Use case for scripting that's not better satisfied by using a scripting language:

Ed reads the entire file. If you need to move back and forth through the file, or move lines from one place to another, or reprocess the same line repeatedly, it can be far more convenient than a scripting language.


There are many editors which will do the job, it is a matter of taste. If you break your terminal by some obscure action, then fix it rather than choosing your entire toolchain around the premise that you will be spending significant time in a broken terminal.

I appreciate historical respect for the tool but this falls short of showing it to be indispensable to everybody.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: