在 Linux 或 macOS 终端中,有多种简单的方法可以将 Windows 风格的换行符(CRLF)转换为 Unix 风格(LF)。
以下是几种最常用的方法:
方法 1:使用dos2unix工具(最推荐)
这是最简单、最直接的方法。如果你的系统中安装了此工具,直接运行:
dos2unix 1.te
如果提示找不到命令,可以通过以下方式安装:
Ubuntu/Debian:
sudo apt-get install dos2unixmacOS:
brew install dos2unix
通过网盘分享的文件:ERROR 'unrecognized character' at token——2.rar
链接: https://pan.baidu.com/s/1WoY7MrnAhNw9e7Ws0PRQ8A?pwd=7m6y 提取码: 7m6y