Thanks guys.
Using dos2unix did not work.
Using 'cut -c1-2 file1' does not remove the first 2 chars from file1, although it 'works'.
Using vi (search for ^.M) or sed -e 's/^.M//' file1 >file2 work fine.
Paul
Hi
I have a file that originated from our IBM mainframe, with the first 2-bytes (I think!) of each record being a control-m character, which the mainframe guys can't remove.
When I vi the file it shows as ^?M
How do I remove this control character from the beginning of every record in the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.