Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Shell programming with bash: by example, by counter-example. Parent comment
find . -type f -name foo -print0 | while read -rd ''; do grep -l bar "${REPLY}" done
Of course, in this case it would be better to use:
find . -type f -name foo -print0 | xargs -0 -I{} grep -l bar '{}'
There are no comments on this comment yet.
Of course, in this case it would be better to use:
but if you've got several things to do for each file, the first one makes sense (or you can put those several things in a script, and use xargs).