In Perl, how to remove ^M from a file?

后端 未结 10 1806
臣服心动
臣服心动 2020-12-28 13:51

I have a script that is appending new fields to an existing CSV, however ^M characters are appearing at the end of the old lines so the new fields end up on a n

10条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-28 14:33

    In vi hit :.

    Then s/Control-VControl-M//g.

    Control-V Control-M are obviously those keys. Don't spell it out.

提交回复
热议问题