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''.


© 1999 The Santa Cruz Operation, Inc. All rights reserved.
UnixWare 7 Release 7.1.1 - 5 November 1999