develooper Front page | perl.beginners | Postings from April 2002

Removing ^M (Carriage Return) from files on *nix

Thread Next
From:
Shaun Fryer
Date:
April 26, 2002 17:06
Subject:
Removing ^M (Carriage Return) from files on *nix
Message ID:
Pine.BSO.4.21.0204261958080.31745-100000@zeus.sorcery.ca
	Someone mentioned this problem recently. Here's a solution.
Open the file in vi and type...

:g/[Ctrl+v][Ctrl+m]/s///

	That will remove all the Carriage Returns from the file in
one shot.

===================
 Shaun Fryer
===================
 London Webmasters
 http://LWEB.NET
 PH:  519-858-9660
 FX:  519-858-9024
===================


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About