One thing I find interesting about this is that the current (totally reasonable) GNU grep behavior is relatively recently (2011). There was a bug on the old behavior in 2006, which was closed as invalid: "Hmm, this cannot be fixed. By definition ..." http://savannah.gnu.org/bugs/?17457
-
-
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
"sponge" tool from moreutils was created exactly for this use case.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I've come across systems where grep a * > test.txt would be an infinite loop. Not sure if it's still the case
-
Yeah infinite loop seems plausible according to POSIX read/write on the same file. But I expect glibc read buffering would detect eof before grep gets to process the final lines...
End of conversation
New conversation -
-
-
Guessing blind: I think there will be two lines of “a” instead of one after running this.
-
Hm… Turns out it was hard to be wrong on this one. Quite fun.
End of conversation
New conversation -
-
-
The appendix hurt. Hardware tends to have multiply-high functionality which is excellent for detecting overflow, but can't be accessed by portable C. And then even if you special-case known compilers, you'll be jumping through hoops to use it.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
What actually happened is I went back to the picture of Zion Narrows and began wondering where it came from and what inspired it. :-D
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.