Hacker News new | ask | show | jobs
by aa-jv 8 days ago
Yes, I think the author is just showing their ignorance, not actually doing anything about that ignorance, and re-inventing the wheel:

    $ find /path -name "*.pdf" -print0 | xargs -0 -I {} echo "Processing: {}" # handles paths properly, obviates the need to write anything new whatsoever
Seriously kids, learn your tools and check yourself before you wreck yourselves writing tools that really, really don't need to be written.
1 comments

find print0 with xargs 0 is such an awesome combination. One day I'll remember to use it instead of piping into while read ln; do ...