我有一个来自我的Mac的.txt文件,当我将它发送到运行Raspbian的Raspberry并在nano中打开它时,它会奇怪地转换。示例:
Mac中的文本文件:
http://welcome.hp.com/country/us/en/prodserv/servers.html
http://www8.hp.com/us/en/products/data-storage/overview.htmlRaspbian中的文本文件:
Servers & Blades
Storage
http://welcome.hp.com/country/us/en/prodserv/servers.html^Mhttp://www8.hp.com/us/en/products/data-storage/overview.html 任何帮助都是非常感谢的。
发布于 2015-05-27 00:07:53
sed -i 's/\r/\n/g' thefile.txt“经典”macos使用\r作为行尾字符。*nix使用\n
https://unix.stackexchange.com/questions/205760
复制相似问题