To insert something at the start of line (for all the lines in the file) when editing file (in this particular example the rm command) in vi do the following: :1,%s/^/rm /g
© 2005 tiplib.com