Pra*_*ati 2 windows linux newlines conversion
我有一堆在 Ubuntu 中创建的文本文件,当我使用 DropBox 在 Windows 机器上访问它们时,由于Line Ending
Unix/Linux 和 Windows 之间的差异,它们的格式不正确。
将 Line Ending 从 Unix/Linux 更改为 Windows 后,文本文件在 Windows 和 Ubuntu 中都能正确呈现。
如何从终端转换 Line Ending 以自动转换?
在 Ubuntu 上:
$ apt-get install dos2unix
$ unix2dos file.txt
Run Code Online (Sandbox Code Playgroud)
在 Windows 上:
dos2unix-<something>\bin\unix2dos.exe file.txt
归档时间: |
|
查看次数: |
2850 次 |
最近记录: |