[Wylug-discuss] Vi question

Paul Branston paul.branston at perseus-cc.com
Mon Jun 30 11:37:54 BST 2003


On Mon, Jun 30, 2003 at 11:19:27AM +0100, ALLEN, David wrote:
> Hi,
>
> Here is a question for all you Vi experts; How do you do a global find and
> replace?
>
> Ta.
>
> David
>
>
>
> CONFIDENTIALITY NOTICE
> The information contained in this e-mail is intended only for the
> confidential use of the above named recipient. If you are not the intended
> recipient or person responsible for delivering it to the intended recipient,
> you have received this communication in error and must not distribute or
> copy it.  Please accept the sender's apologies, notify the sender
> immediately by return e-mail and delete this communication.  Thank you.
>
> _______________________________________________
> Wylug-discuss mailing list
> Wylug-discuss at wylug.org.uk
> http://list.wylug.org.uk/mailman/listinfo/wylug-discuss


:%s/pattern/replacement/g

% for do this on every line ( swap % for 1,10 to do the replacement on lines
   1 - 10 inclusive)
g replace the pattern more than once on each line that matches

--
/*
 *  Paul Branston
 *  Unix Consultant, Perseus Computer Consultants Ltd.
 *  Mobile:       07860 447931
 *  Leeds office: 0113 2635584
 *  Office: 0845 0513970
 */




More information about the Wylug-discuss mailing list