When I try to iterate over some filenames (with whitespaces in them) in bash, I came up with the following:
export IFS=$(echo -e "\n")
for i in $(ls -1); do echo $i; done;
however, this does not seperate the files at all; it stores all the filenames in one variable $i.
When I change IFS to:
export IFS=$(echo -e "\n\b")
it does give the desirable response.
Why is the '\b' necessary? What needs to be 'backspaced' ?