DOS & UNIX文件格式转换

1、使用vi编辑器

vi  xxxx
:set fileformat=unix(or dos)
:wq

2、使用 dos2unix

这个只能把DOS转换成UNIX文件
1. sudo apt-get install dos2unix
2. dos2unix xxx(文件)

3、使用 tr

只能DOS转UNIX
$ tr -d '\r' <dosfile> unixfile

4、使用 UltraEdit
文件 -> 转换

猜你喜欢

转载自www.cnblogs.com/BrianChen/p/10918180.html
今日推荐