[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Vim/formatting question (WordPerfect files)
From: |
Zvezdan Petkovic |
Subject: |
Re: [Groff] Vim/formatting question (WordPerfect files) |
Date: |
Tue, 13 Mar 2007 18:46:11 -0400 |
User-agent: |
Mutt/1.4.2.2i |
On Tue, Mar 13, 2007 at 03:04:21PM -0700, Nick Stoughton wrote:
> Try using tr ... The character '^@' is a null byte (for tr, this is
> '\000'). You can strip out all control chars by:
He asked about ~@, not address@hidden
The easiest way to find what it represents is saving it in another file
and running od -x on the file.
> tr -d '[:cntrl:]' < xxx.wpd > xxx.txt
>
> (or, in vim: gg!Gtr -d '[:cntrl:]')
>
> This won't strip out chars with the top bit set, but read the man page!
As far as I understand he would like to replace them with a space rather
than just strip them. Again, he can do this in Vim too:
:%s/[[:cntrl:]]\+/ /g
This will replace any run of 1 or more control characters with one space.
Best regards,
ZP