News for hackers. Stuff that matters.
Re:Actually using Ed by sashahart on Saturday June 16, 2012 @11:09AM (#4120802)
On many systems you should be able to unbork the terminal with 'reset' or 'tput reset'. Then you do not need ed ;)
Re:Actually using Ed by dllthomas on Saturday June 16, 2012 @12:39PM (#4120981)
That's only going to fix a few causes of borked-ness. If the remote system doesn't have a termcap for your terminal, reset doesn't do much. In that case, setting TERM=vt100 will probably help matters, unless you're on a really obscure terminal of some sort.
Re:Actually using Ed by sashahart on Saturday June 16, 2012 @03:05PM (#4121339)
I think my underlying point is that it's fine to learn ed, but if the problem is that you are borking your terminal then there are actually ways around that. These days it should almost never happen that you are sitting around tolerating a broken terminal. This is not an efficient use of time. The actual modern use cases for ed are not very common. If you want to learn it just for kicks or because you think it's cool then that is another thing.
Re:Actually using Ed by kstrauser on Saturday June 16, 2012 @06:01PM (#4121621)
That last happened to me fairly recently, when a server was unable to mount /usr (where the termcap stuff lives) and I had to use ed to edit the RAID config files so that I could mount it. Fun times.
Re:Actually using Ed by dllthomas on Sunday June 17, 2012 @01:39AM (#4122325)
Ouch, more extreme than I was thinking. I've encountered systems that don't like screen or urxvt or what have you, but they still had vt100 and that's a useful subset of the termcap of most modern terminal emulators. If there's no /usr at all, that's certainly a stronger argument for ed!
Re:Actually using Ed by ralph on Sunday June 17, 2012 @07:20AM (#4122694)
I've used ed and other commands on headless systems more than once, back when networks weren't common. One has to be careful of typing and having a bell can be useful for reassurance; grep newthing foo && echo ^G.