Sometimes you need to append something to the end of line in a text file or script. Use the following vi command (in this example append a semicolon ';' to the end of every line in the file). :1,$s/$/;/g
© 2005 tiplib.com