My script
export IFS=":"
cat hello | while read a b c d; do
echo $a,$b,$c,$d
done
My file hello
1:1:1:1
2:2:2:2
3:3:3:3
My output
1,1,1,1
2,2,2,2
If I put a blank line after 3:3:3:3
in hello
then the output becomes
1,1,1,1
2,2,2,2
3,3,3,3
Anyone know how I can fix this problem so I don't need to put a blank line at the end of hello
?