How to remove ^M character

Kevin Kinsey kdk at daleco.biz
Fri Aug 1 08:29:13 PDT 2003


On Fri, Aug 01, 2003 at 02:01:18PM +0530, Anil Garg wrote:
> Hi,
> 
> I ftp'd a file from windows to freebsd....not its every line has ^M at its
> end. Is there some command in vi (or some way) by whcih ^M can be removed.
> 
> Thanks
> Anil
> 
YAW (yet another way...)

sed 's/.$//' infile.txt > outfile.txt


KDK


More information about the freebsd-questions mailing list