cleaning named file
Barry Finkel
b19141 at achilles.ctd.anl.gov
Fri Sep 13 14:58:16 UTC 2002
At 05:22 PM 9/12/02, Dean Carrera wrote:
>>does anyone know how to clean carriage returns from a file using vi? =20
Danny Mayer <mayer at gis.net> replied:
>Why? This has nothing to do with BIND.
It does if, for example, a config file or a zone file is created on a
PC and then moved to Unix via some method that does not remove the
carriage returns. I routinely copy PC files to a floppy at home and
load the files on my desktop Solaris workstation at work via "cp".
This method does not remove the carriage return (<cntl-m>) characters.
The subject line leads me to believe that Dean Carrera has such a
BIND file.
One answer is
:1,$s/^V^M$//
Where the sequence "^V^M" is <cntl-v> followed by <cntl-m>.
The <cntl-v> is the escape for <cntl-m> so that the <cntl-m> is not
treated as a carriage return. This command will remove <cntl-m>
chars at the end of lines. Other <cntl-m> characters will remain
intact.
----------------------------------------------------------------------
Barry S. Finkel
Electronics and Computing Technologies Division
Argonne National Laboratory Phone: +1 (630) 252-7277
9700 South Cass Avenue Facsimile:+1 (630) 252-4601
Building 222, Room D209 Internet: BSFinkel at anl.gov
Argonne, IL 60439-4828 IBMMAIL: I1004994
More information about the bind-users
mailing list