Why is my Bash script adding to the beginning of files?

前端 未结 2 410
孤独总比滥情好
孤独总比滥情好 2021-02-04 03:18

I\'ve written a script that cleans up .csv files, removing some bad commas and bad quotes (bad, means they break an in house program we use to transform these files) using sed:

2条回答
  •  清酒与你
    2021-02-04 03:49

    To get rid of these in GNU emacs:

    1. Open Emacs
    2. Do a find-file-literally to open the file
    3. Edit off the leading three bytes
    4. Save the file

    There is also a way to convert files with DOS line termination convention to Unix line termination convention.

提交回复
热议问题