removing EOL characters (^M) from DOS edited files
I am trying to figure out how to remove the end of line characters that get put into files edited by windows apps so that I can use them in Linux.
I am able to remove them manually by using 'vim -b', but am thinking that there must be an easier way.
I appreciate any help offered.
It's a matter of converting \r\n to \n:
perl -i.orig -npe 's/\r\n/\n/g' file_name_here_or_use_wildcard_character
Original file becomes same_file_name.orig
Thanks, that was exactly what I was looking for.