Removing ^M from UNIX file – remove DOS new line char

VI:

:%s/^M//g

sed:

cat $FILE_NAME | sed 's/^M//g' > $OUTPUT_FILE_NAME

tr:

tr -d '\r' < inputfile > outputfile

(Note! In order to produce ^M press Ctrl-V, Ctrl-M)