Originally posted by SeT
that's pretty common of a file that was created in windows. can be corrected by:
cat originalfile | tr -d \\015 >> newfile
I understand most of this...I think...
"cat" will concatenate or simply output the file to the standard output, but here it is piped into the "tr" command which will translate or delete characters. In this case the "-d" option or delete option is specified so the characters will be deleted .. and then this ">>" sends the output to a new file with the given name.
But how did you know to use "\\015" as the equivalent of "^M" ?