Summary: vi command help

From: Kirkland, Mike # IHTUL <mike.kirkland_at_ndchealth.com>
Date: Mon, 23 Jul 2001 16:25:54 -0500

Thanks to alan_at_nabeth.cxo.dec.com and Bob Full and George Gallen, who
suggested these methods:

I'd use:

        %s/() \//

        For the combination of the two. For just the ():

        %s/()/

        And for the /:

        %s/\//

and
...
Try using the substitute command as follows:

vi filename

:%s/()//g
:%s/\///g

Hope this helps...

...
why not use sed?
cat filename | sed s/\{//g | sed s/\}//g | sed s/\///g > newfilename



The original question:

I have some files that I want to remove special characters with using the ex
commands in vi.

Below is an example of a file; I have tried several combos and have not hit
on the correct one yet, and thoughts??

One to remove the ( ) in all the lines. two to remove the / in all the
lines.

number one () /
alone () /
this file. () /
that file



Mike Kirkland
Unix System Administrator
National Data Corporation
Phone: (918) 481-2817
Fax: (918) 481-4275
mike.kirkland_at_ndchealth.com <mailto:mike.kirkland_at_ndchealth.com>
NDC®| HEALTH
6100 South Yale Avenue
Suite 1900
Tulsa, OK 74136
Received on Mon Jul 23 2001 - 21:33:48 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:42 NZDT