[lug] VI help

Dave Brown dbrown at scd.ucar.edu
Wed Jul 11 11:57:06 MDT 2001


> 
> 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?
> 
:%s/^/whatever your string is/

> While I'm at it, I have to add a different string to the end of every
> line.
> 
:%s/$/different string/




More information about the LUG mailing list