
dos2unix, unix2dos 用来实现 DOS <=> UNIX text file 转换
aptitude install sysutils
行末:
DOS 格式 0d 0a
UNIX 格式 0a
可用功能相同的指令組合
dos2unix:
sed -i'' "s/r//" file
或
cat file | col -b > newfile
或
cat file | tr -d "r" > newfile
或
cat file | tr -d "15" > newfile
unix2dos:
sed -i'' "s/$/r/" file
或
sed -i'' "s/$/x0d/" file
-i后面的是单引号组成
...