sed -e 's/$/\r/' inputfile > outputfile
sed -e 's/\r$//' inputfile > outputfile
perl -pe 's/\r\n|\n|\r/\r\n/g' inputfile > outputfile
This one works for Mac.
perl -pe 's/\r\n|\n|\r/\n/g' inputfile > outputfile
perl -pe 's/\r\n|\n|\r/\r/g' inputfile > outputfile