Iterations Loop line over lines, whatever spaces in it: while IFS= read -r line; do echo "... $line ..." done < <(printf '%s' "$list") Same, but with a variable: while IFS= read -r line; do echo "... $line ..." done <<< "$MY_TEXT"