(Note: Both of these examples may require GNU or BSD find and may not work as-is with the POSIX edition of find).Both of the scriptlets below must be understood as excerpts from way more complex scripts, with the gist having been compacted into a few lines.As I get the exact same results with both variants, I'm wondering where the differences (respectively: pitfalls) of either implementation may be...var. 1  while IFS= read -r f; do  echo reading entry: $fdone < <(find ~/workdocs -type f -name '*.pdf' -print)var. 2  while IFS= read -rd '' f; do  echo reading entry: $fdone < <(find ~/workdocs -type f -name '*.pdf' -print0)It turned out that the output (which this question is all about here) was entirely identical in both cases. (Tested by redirecting to output log file, then diff'ing both)Still, I am wondering if there might be any borderline cases which may actually cause the outputs from variant #1 and #2 to differ.This is what I'd like to know about.
bash: What is the difference between these two script variants?
bash;shell script;find;gnu