On Wed, Aug 19, 2026 at 11:17:45AM +0200, Edgar Fu? wrote:
> > like "for f in ${allf}" where the ${allf} value needs to be field split
> > - that's not really safe, but the alternative is messy.
>
> Why is that unsafe? What else could one do?
Suppose you have:
allf=$(ls *.jpg)
for f in $allf; do
printf 'File: %s\n' "$f"
done
Now imagine that the files in $CWD are foo.jpg, bar.jpg, and silly
filename with spaces.jpg...
There is no easy way to make it more robust, unfortunately.
--
David A. Holland
[email protected]