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' combined.csv
But it does not work and a blank line is still there. I can remove the last line using the following command.
sed -i '$d' combined.csv
But is it possible to check if the last line is really empty before removing it?
Update:
I am using the following command to check if each line start with a number.
sed -i '1s/^[^0-9]*//' combined.csv
This checks only for the first line and not the rest of the lines. How do I make it check all the lines in the file? This might solve my problem.