7 ms·
On many systems you should be able to unbork the terminal with 'reset' or 'tput reset'. Then you do not need ed ;)
by sashahart 14y ago
On many systems you should be able to unbork the terminal with 'reset' or 'tput reset'. Then you do not need ed ;)
- dllthomas 14y agoThat'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.
- sashahart 14y agoI 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.
- kstrauser 14y agoThat 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.
- dllthomas 14y agoOuch, 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!
- ralph 14y agoI'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.