DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Editing files

Accessing the shell

To include the output from a system command, you would enter the following:

:r !command

This inserts the output below the current line. Alternatively, to replace the current line, type the following:

!!command

For instance, :r !date includes the date and time below the current line; :$r !date puts the date and time at the end of the file. See also ``Running other programs from inside vi''.


Next topic: Editing more than one file
Previous topic: Including the contents of another file

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 03 June 2005