Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!burl!codas!killer!ozdaltx!root From: root@ozdaltx.UUCP Newsgroups: comp.unix.questions Subject: Re: Invisible Ascii with VI Message-ID: <4320@ozdaltx.UUCP> Date: Sun, 27-Sep-87 13:05:22 EDT Article-I.D.: ozdaltx.4320 Posted: Sun Sep 27 13:05:22 1987 Date-Received: Tue, 29-Sep-87 01:47:36 EDT References: <258@unx1.UUCP> Organization: OZ BBS - Dallas, TX Lines: 31 In article <258@unx1.UUCP>, andy@unx1.UUCP (Andy Clews) writes: > Does anyone out there know if it's possible to insert/search/replace > non-printing ascii characters? > CR tacked on the end of the line, and VI shows them as ^M on the screen. > them with, say, a global substitute. I've tried 1,$s/^V^M$// but this > does not seem to do what I want. I get the same especially since I have a lot of PC users here. So, not only do I get the ^M, but ^Z's as well. :-) ^M will be the last character on a line, so with vi you can use; 1,$s/.$// or :g/^V^M/s/// That's assuming you are actually typing CTRL-V,CTRL-M... Use the :l (el) option in ed or vi to show the invisable values in the file. If you use ed, you should be able to use CTRL-M within the subsitiute statement, g/CTRL-M/s///. Where CTRL-M is your pressing CTRL key and M at the same time. "Works for me...." - some TV cop. -- ============================================================ | Scotty | Adapt - Enjoy - Survive | | ihnp4!killer!ozdaltx!sysop | "Ad Venerem Securiorem" | ============================================================