This is an extensive reading for the question why?
If you don't want to put a new line at the end, you can do this:
while IFS=: read -r a b c d || [ -n "$a" ];
do
echo $a,$b,$c,$d;
done < file
Or using grep:
while IFS=: read -r a b c d;
do
echo $a,$b,$c,$d;
done < <(grep "" filee)
Note:
- There's no need to use cat with while loop.
- You should almost always use the -r option with read.