1752682 Members
5585 Online
108789 Solutions
New Discussion юеВ

Re: vi help

 
SOLVED
Go to solution
lawrenzo_1
Super Advisor

vi help

Hi,

what is the syntax to add a character to the end of each line containing a string?

ie:

gemp123
gemp234
gemp345
gemp456

so i want to add a : to the end of each line:


:g/^gemp/ help?

many thanks

Chris
hello
2 REPLIES 2
James R. Ferguson
Acclaimed Contributor
Solution

Re: vi help

Hi Chris:

Type this:

:%s/$/:/g

Regards!

...JRF...
lawrenzo_1
Super Advisor

Re: vi help

thats the one ....

Thanks James!
hello