4 ms·
People often underestimate the power of ed. It's very useful when terminals are misbehaving and curses editors no longer work, or in shell scripts which modify
by saljam 13y ago
People often underestimate the power of ed. It's very useful when terminals are misbehaving and curses editors no longer work, or in shell scripts which modify files. (Ed commands in here documents.)
Ed anecdote: A friend of mine once wanted to make an inverted version of sed, which takes commands on stdin and applies them to a file named in the arguments. I think he called it fsed. I facepalmed and gave him my copy of The UNIX Programming Environment.
- dfox 13y agoOn more than one occasion I ended up editing files by piping them through sed because even ed didn't work (it tends to require writable /tmp or something like that)