[SunHELP] Those damn ^M's
Nicholas Dronen
sunhelp at sunhelp.org
Fri Nov 2 17:11:21 CST 2001
On Sat, Nov 03, 2001 at 12:24:55AM +0300, Bashar wrote:
>
> perl -i.bak -npe 's/\r\n/\n/g' <file>
>
> this will do a backfile of the original file named <file>.bak if
> you dont want a backup remove the .bak
This one is even more useful when you have a set of files
from which you want to remove
's. To take your example,
$ perl -i.bak -npe 's/\r\n/\n/g' $(find /dir -name '*.c' -print)
Regards,
Nicholas Dronen
More information about the SunHELP
mailing list