I searched online about this problem, and so far I have found two ways:
while read line; do commands done < "$filename"
and
for $line in $(cat $filename); do commands done
none of them work if the lines have a space, for example, if we have such a line
textextext text
it will not print textextext text
but
textextext text
he considers these things to be another line, how can I avoid this?
source share