Wouldn’t for i in "$LIST"; just result in a single loop iteration with $i being the entirety of $LIST?
Wouldn’t for i in "$LIST"; just result in a single loop iteration with $i being the entirety of $LIST?
Thanks, that is very nice to hear!
Its not for everyone but I’ve been using NixOS as my desktop OS for nearly 10 years and I am honestly pretty satisfied with the experience.
I’m pretty sure that IFS does not apply to quoted strings since word splitting happens before the quote removal (see Shell Expansion).
$ ( files=$(ls); IFS=$'\n' ; for x in $files; do echo $x; done ) file a.txt file b.txt plainfile.txt $ ( files=$(ls); IFS=$'\n' ; for x in "$files"; do echo $x; done ) file a.txt file b.txt plainfile.txt