Removing last blank line

前端 未结 5 1511
礼貌的吻别
礼貌的吻别 2021-02-12 14:50

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         


        
5条回答
  •  你的背包
    2021-02-12 15:09

    If you know for sure that last line is empty, then just use: ...| head -n -1 | ...

提交回复
热议问题