5 ms·
"* Ed now stops reading stdin when reaching real End Of File the first time. (Before it needed to reach EOF twice)." Once? You've gotta be kidding. In older,
by sramsay 13y ago
"* Ed now stops reading stdin when reaching real End Of File the first time. (Before it needed to reach EOF twice)."
Once? You've gotta be kidding. In older, hardcore versions, ed would BLOW RIGHT PAST your first EOF. It would say, "So long, sucka!" to your first EOF. It would assume you weren't serious with that first one, BECAUSE YOU WEREN'T.
What ed was looking for was EOT (end of tape). Because that was serious. When it saw EOF, it thought, "Oh, for fuck's sake. It's amateur hour." Now ed is apparently all about "user friendliness."
This is bullshit.
- dhimes 13y agoThank you. You made my morning.
- cema 13y agoA great example of a joke which works in HN. Some don't but this one does. Thank you.
- kps 13y agoMade me look. Real ed(1) exits on the first EOF. [1] http://www.tuhs.org/ http://www.tuhs.org/ [2] http://puszcza.gnu.org.ua/software/apout/ http://puszcza.gnu.org.ua/software/apout/
- saurik 13y ago(EOT also happens to be the character you use to represent EOF; this was largely a joke, possibly referencing that "Ed is the real text editor" rant from decades ago that specifically discussed how difficult it was to exit ed as one of its many features. I found it funny.)
- kps 13y agoYes, I know it was a joke. I just had to check that my memory wasn't acting up. (I actually had to use nothing but ed for real work for a few months in 1985 — makes for good training in regular expressions.) Real ed only requires two EOF (or 'q' commands) if the file has changed, so you don't quit by accident, but driving it by script won't hang.