I have problem with "IFS=$'\n'.
old_IFS=$IFS
file="Good morning
Good morning
Good morning
Good morning
Good morning"
IFS=$'\n'
for line in $file
do
echo $line
done
IFS=$old_IFS
When I execute the script:
Good mor
i
g
Good mor
i
g
Good mor
i
g
Good mor
i
g
Good mor
i
g
The "n" is deleted. I would like to view the files line by line