1,089 karma · joined March 1, 2007
C, Unix system and shell, Python, X Windows, ARM, ...
find -exec grep -iH ${1?} {} +
Though it still runs grep on directories.This isn't getting us anywhere. We disagree. I value the opinion of that lot given their many decades of experience. I used to have your opinion, based on textbooks. They've made a good point, one I can see has considered thought behind it.
Many generations of the compiler are created. Let's say the compiler-in-C is worked on until it compiles subset Gosub1 which is just enough to write compiler-in-Gosub1 that duplicates compiler-in-C's behaviour. From now, compiler-in-C atrophies. G-2 features are implemented in G-1's compiler, though nothing uses them yet. The compiler's source then uses these, making it G-2 source, only compilable by a G-2-grokking compiler.
Weeks later we have a G-40 where a bug is discovered, introduced in G-20. It wasn't in the compiler-in-C so that's not useful. Choices include fixing it at `head', which can sometimes be awkward as described earlier, or fixing the initial G-20 implementation and then rolling forward all changes from there assuming the fix doesn't break code that was depending on the errant behaviour.
perl -e 'opendir D, "."; @f = grep {$_ ne "." && $_ ne ".."} readdir D;
unlink(@f) == $#f + 1 or die'
It goes a bit quicker still if @f and the error handling are omitted.The original article is comparing different things some of the time, e.g. find is having to stat(2) everything to test if it's a file.
curl -s https://api.github.com/users/$2/events/public |
grep "\"gravatar_id\":" |
sed -e's/[,|"]//g' |
head -n 1 |
awk '{print $(NF)}'
can be curl -sS https://api.github.com/users/$2/events/public |
sed -n '/"gravatar_id":/!d; s/",//; s/.*"//p; q'
and so on.