Public domain
sed -i 's/\r//' file.txt
sed -i 's/$/\r/' file.txt
BY: Pejman Moghadam
TAG: dos2unix, unix2dos
DATE: 2012-03-28 17:31:03
With many thanks and best wishes for dear Pejman Moghadam, someone who taught me alot in linux and life :)