[lug] VI help

Ken Weinert kenw at ihs.com
Wed Jul 11 11:56:28 MDT 2001


This probably isn't the most elegant way as I normally use vi just for
quick hacks, but you can do it by:

:1,$s/^/new text at front of line/

and

:1,$s/$/new text at end of line/


* Shannon Johnston (nunar at iws.net) [010711 17:52]:
> Hey All,
> I've got a 2,000 line document that I need to add a string to the
> beginning of every line. I know there's a way to do this easily in vi, I
> just don't know how. Can anybody help?
> 
> While I'm at it, I have to add a different string to the end of every
> line.
> 
> Thanks,
> Shannon
> 
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug

-- 
Ken Weinert   kenw at ihs.com 303-858-6956 (V) 303-705-4258 (F)
GnuPG KeyID: 9274F1CE           GnuPG available at http://www.gnupg.org/
GnuPG Key Fingerprint: 1D87 3720 BB77 4489 A928  79D6 F8EC DD76 9274 F1CE
For your conveniance, all possible replies follow (some assembly 
required): 1 0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20010711/60ba8142/attachment.pgp>


More information about the LUG mailing list