"* 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."
It's worth avoiding linking to Google Groups entirely, on the basis that the new UI is unusable and that the product will probably be canned soon enough.
ed is actually really handy in shell scripts when you want change something in a text file, and want to navigate in the text by following landmarks. Eg. if you are editing an .ini file the sed or awk methods are much more cumbersome, with ed it's just a couple of navigation commands and a in-place replace and save.
Plus you get to try things out interactively and then
paste the working set of commands in your script. it's like sed with a repl, only better!
That breaks if the file to include contains a line with just a ., unfortunately. But it's still ridiculously simple, and that's likely not to be a problem in a lot of cases.
I actually prefer ed/ex to screen editors when doing quick fixes because I can still see what's in the terminal (although I still use both emacs and vi as well).
[+] [-] sramsay|13 years ago|reply
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.
[+] [-] kps|13 years ago|reply
[1] http://www.tuhs.org/ [2] http://puszcza.gnu.org.ua/software/apout/
[+] [-] dhimes|13 years ago|reply
[+] [-] cema|13 years ago|reply
[+] [-] hosay123|13 years ago|reply
GMane is a good community-oriented alternate:
http://thread.gmane.org/gmane.org.fsf.announce/1952
[+] [-] zurn|13 years ago|reply
Plus you get to try things out interactively and then paste the working set of commands in your script. it's like sed with a repl, only better!
Example: https://groups.google.com/group/comp.unix.shell/msg/e823e275...
[+] [-] philh|13 years ago|reply
[+] [-] ultimoo|13 years ago|reply
[+] [-] geocar|13 years ago|reply
* http://geocar.sdf1.org/ed.c
* http://geocar.sdf1.org/ed.c.orig
I actually prefer ed/ex to screen editors when doing quick fixes because I can still see what's in the terminal (although I still use both emacs and vi as well).
[+] [-] gnuvince|13 years ago|reply
[+] [-] asdfs|13 years ago|reply
And of course there's the obligatory: http://www.gnu.org/fun/jokes/ed-msg.txt
[+] [-] jdale27|13 years ago|reply
[+] [-] michaellacorte|13 years ago|reply
The first time I read this, I almost fell out of my chair in laughter.
[+] [-] rquantz|13 years ago|reply
https://news.ycombinator.com/item?id=5246071
[+] [-] Mr_T_|13 years ago|reply
[+] [-] EliRivers|13 years ago|reply
[+] [-] aeonflux|13 years ago|reply
[+] [-] mhd|13 years ago|reply
[+] [-] RBerenguel|13 years ago|reply