I have a variable final_list
which is appended by a variable url
in a loop as:
while read url; do
final_list="$final_list"$'\n'"$url"
done < file.txt
To my surprise the \n
is appended as an space, so the result is:
url1 url2 url3
while I wanted:
url1
url2
url3
What is wrong?