util/scripts/unix_to_dos
author Eckhart Koeppen <eckhart.koppen@nokia.com>
Wed, 21 Apr 2010 12:15:23 +0300
branchRCL_3
changeset 12 cc75c76972ee
parent 0 1918ee327afb
permissions -rwxr-xr-x
a69086a7359b3de9db0823ce58d9aab8b5c369be

#!/usr/bin/perl

undef $/;

foreach $f ( @ARGV ) {
    if ( open( F, "< $f" ) ) {
	$i = <F>;
	close F;
	$i =~ s/\n/\r\n/g;
	$i =~ s/\r+/\r/g;
	if ( open( F, "> $f" ) ) {
	    print F $i;
	    close F;
	}
    }
}