4 ms·
IFS needs some care and attention and read should have -r. $ ls -Q " spaces " $ ls | while IFS="\n" read -r f; do ls "$f"; done spaces
by ralph 14y ago
IFS needs some care and attention and read should have -r.
$ ls -Q
" spaces "
$ ls | while IFS="\n" read -r f; do ls "$f"; done
spaces
$
For lots of grim detail see David A. Wheeler's http://www.dwheeler.com/essays/fixing-unix-linux-filenames.html http://www.dwheeler.com/essays/fixing-unix-linux-filenames.h...