in reply to Unix vs Windows Text File Format
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Unix vs Windows Text File Format
by dave_the_m (Monsignor) on Aug 05, 2010 at 10:09 UTC |