Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Jan 2010 18:23:09 +0000
From:      Mike Clarke <jmc-freebsd2@milibyte.co.uk>
To:        freebsd-questions@freebsd.org
Cc:        gahn <ipfreak@yahoo.com>
Subject:   Re: vi editing
Message-ID:  <201001151823.09985.jmc-freebsd2@milibyte.co.uk>
In-Reply-To: <723540.47549.qm@web52106.mail.re2.yahoo.com>
References:  <723540.47549.qm@web52106.mail.re2.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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:
>
> xxxxxxxxx
> xxxxxxxxx
> xxxxxxxxx
>
> after that, I want to have:
>
> "new word" xxxxxxxxx
> "new word" xxxxxxxxx
> "new word" xxxxxxxxx
>
> How could I do that with vi?

:%s/^/"new word"/

-- 
Mike Clarke



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001151823.09985.jmc-freebsd2>