Hi gurus:
I am trying to add a word on every line (right in front of every line) via vi.
Right now I have:
x
x
x
after that, I want to have:
new word x
new word x
new word x
How could I do that with vi?
preface each line:
:%s/^/new word /g
--
J.D. Bronson
Information Technology
Aurora Health Care - Milwaukee WI
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to
On Fri, 15 Jan 2010 07:37:49 -0800 (PST) gahn wrote:
I am trying to add a word on every line (right in front of every line) via
vi. Right now I have:
x
x
x
Type this:
:%s/^/new word /
after that, I want to have:
new word x
new word x
new word
On Fri, Jan 15, 2010 at 12:11:32PM -0600, J.D. Bronson wrote:
preface each line:
:%s/^/new word /g
The trailing g isn't needed because you only need one substitution on
each line. Thus:
:%s/^/new word /
--
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]
On Friday 15 January 2010, gahn wrote:
Hi gurus:
I am trying to add a word on every line (right in front of every
line) via vi. Right now I have:
x
x
x
after that, I want to have:
new word x
new word x
new word x
How could I do that
On Fri, 15 Jan 2010 07:37:49 -0800 (PST), gahn ipfr...@yahoo.com wrote:
Hi gurus:
I am trying to add a word on every line (right in front of every line) via
vi. Right now I have:
x
x
x
after that, I want to have:
new word x
new word x
new word