Got some problems executing this command in vi:
:s/dapper/edgy/c
which I expect to search and replace text with confirmation when I have edited my ubuntu sources.list
The problem is solve using the command:
:%s/dapper/edgy/c
or
:.,$s/dapper/edgy/c
Conclusion:
Commands in vi generally starts with what range of line numbers are to be searched/processed.
. represents the current line of file
$ last line of file
^ first line of file (never tried it though you can 1 to be sure)
% represents all lines of the current file.
Enjoy
Hi.
In my case, I don’t usually go for /c parameter. As long as I’m sure about the text I’m changing, I use /g.
You got a cool blog. Keep it up.
Comment by Dong Calmada — 3 2007f March, 2007 @ 7:26 pm |
Thanks Dong. You too have cool blog. It has been weeks since I have last updated this site.. Your right about the /g.. the article aims to be a primer though. Thanks again.
Comment by rudyegenias — 5 2007f March, 2007 @ 11:07 am |