DOS与UNIX文件风格互转
DOS文件行以\r\n结尾,UNIX文件行以\n结尾。
DOS --> UNIX :
sed 's/.$//g' dosfile > unixfile
tr -d "\r" dosfile > unixfile
UNIX --> DOS :
sed 's/$/\r/g' unixfile > dosfile
DOS文件行以\r\n结尾,UNIX文件行以\n结尾。
DOS --> UNIX :
sed 's/.$//g' dosfile > unixfile
tr -d "\r" dosfile > unixfile
UNIX --> DOS :
sed 's/$/\r/g' unixfile > dosfile