Need help with a shell script
I am teaching some students PHP and they are uploading files that they work on at home and at school. Many of these files contain a ^M character where there would normally be a UNIX line feed (in the files that I write, that is). This is making it harder for me to read their scripts.
I thought, "Well, just write a shell script to search for ^M in a file and replace all occurences with the UNIX line feed, when you supply the filename as the argument for the script." The idea seems easy enough, and I have a book on writing shell scripts which I will consult. My only problem: I don't know what character(s) or ASCII code to have the script replace the ^M with, in order to get a UNIX line feed. Do any of you?
Thanks a million!