how to get rid of ^M character using vi

Dom De Vitto dom at DeVitto.com
Sun Jan 25 15:35:36 PST 2004


Try:
:1,$sX^V^MX??

Where '^' means 'control', e.g. ^V is control-V, ^M is control-M.

Control-V can be used to enter any non-printable ascii character.

Easy when you know.
Dom
PS. the same magic works outside of VI, with sed.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Dom De Vitto                                       Tel. 07855 805 271
http://www.devitto.com                         mailto:dom at devitto.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-----Original Message-----
From: owner-misc at openbsd.org [mailto:owner-misc at openbsd.org] On Behalf Of
marlon corleone
Sent: Sunday, January 25, 2004 9:43 AM
To: freebsd-questions at freebsd.org; misc at openbsd.org
Subject: how to get rid of ^M character using vi

how do i get rid of this annoying character ^M using vi, in pico i used the
arguments '-w'
but what about in vi?

cheers

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus







More information about the freebsd-questions mailing list