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