There is a para break at the end of my .csv file. I tried to remove the blank line that is at the end of the file using the following command.
sed -i \'/^$/d\' c
If you know for sure that last line is empty, then just use: ...| head -n -1 | ...
...| head -n -1 | ...