perl -pi '.bak' -e 's/^M//' <FILE_NAME>
Note: ^M above is actually a literal [CTRL]-M, this can be entered in the shell as [CTRL]-V [CTRL]-M
([CTRL]-V - "take the next character as a literal")
Edited as dave_the_m pointed out, I had the run options in the wrong order, I can only put this down to a lack of caffeine
In reply to Re: Unix vs Windows Text File Format
by Utilitarian
in thread Unix vs Windows Text File Format
by merrymonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |