Remove trailing spaces from a file using Windows batch?

前端 未结 7 1290
借酒劲吻你
借酒劲吻你 2020-12-02 02:33

How could I trim all trailing spaces from a text file using the Windows command prompt?

7条回答
  •  遥遥无期
    2020-12-02 02:54

    Go get yourself a copy of CygWin or the sed package from GnuWin32.

    Then use that with the command:

    sed "s/ *$//" inputFile >outputFile
    

提交回复
热议问题