Convert file format from dos to unix
paul
posted @ Fri, 25 Feb 2011 08:55:11 +0800
in coding life
with tags
file format Perl sed vim
, 4132 readers
Convert file format by sed
$cp you-file-name your-file-name.bak $sed 's/^M//g' your-file-name.bak > your-file-name
Covert file format by Perl
$perl -i.bak -pe 's/^M//g;' your-file-name
Covert file format by vim
:setlocal ff=unix :wq
This work is licensed under a Creative Commons Attribution 3.0 Unported License.