Date: 21-09-11 15:37
After a long painful learning curve I came up with this solution to strip out the ^M characters Windows leaves.
sed 's/\^M$//' file > tfile
mv tfile file
the ^M (ascii 13) has to be entered as the actual ascii character. The $ is what sed uses to indicate the end of line. This works under sh.
This script only strips the ^M's off of the end of the lines.
Post Edited (21-09-11 15:39)