|
|
|
|
|
by cb321
1220 days ago
|
|
Shells usually do not re-split on whitespace after filename generation. So, you could also just use an asterisk for your number one use case: dash$ touch "hi ho"
dash$ touch "there, buddy"
dash$ for f in *; do echo $f; done
hi ho
there, buddy
(EDIT: That was in a scratch directory.) But as @npongratz alludes to in sibling https://news.ycombinator.com/item?id=34727735 find . [predicates] -print0 | xargs -0
is bulletproof and directory scanning, output, and input loops all run at full C speed. (One predicate is `-maxdepth 1` to not recurse.) |
|