How to remove invisible character?

Bill Jonas bill at billjonas.com
Thu Apr 10 15:13:32 MST 2008


On Thu, Apr 10, 2008 at 06:35:30AM -0700, Josef Lowder wrote:
> Thanks to all.  I used dos2unix and that worked fine, 
> but I was also glad to learn about the 'cat -vet' option 
> and the idea of using sed.

Just a note: You mentioned that you couldn't see it while editing.  Were
you using vim?  If so, you can just do ":set fileformat=unix" to take
care of it.  Other vi clones may vary.

(If you were able to see the characters, as you would in some vi clones
which don't handle DOS and Mac text file formats, they'd look like ^M,
and you'd be able to get rid of them by doing ":%s/<Ctrl-V,Enter>//g".)

-- 
Bill Jonas    *    bill at billjonas.com    *    http://www.billjonas.com/
"It's a dangerous business, Frodo, going out your front door.  You step
into the Road,  and if you don't keep your feet,  there  is  no knowing
where you might be swept off to."  --  Bilbo Baggins


More information about the PLUG-discuss mailing list