UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: 8.5 Accessing Multiple FilesChapter 8
The vi Editor
Next: 8.7 Macros
 

8.6 Interacting with Unix

:r fileRead in contents of file after cursor.
:r !commandRead in output from command after current line.
:nr !commandLike above, but place after line n (0 for top of file).
:!commandRun command, then return.
!object command

Send buffer object to Unix command; replace with output.

:n,m! command

Send lines n-m to command; replace with output.

n!!commandSend n lines to Unix command; replace with output.
!!Repeat last system command.
:shCreate subshell; return to file with EOF.
CTRL-ZSuspend editor, resume with fg.
:so fileRead and execute ex commands from file.


Previous: 8.5 Accessing Multiple FilesUNIX in a Nutshell: System V EditionNext: 8.7 Macros
8.5 Accessing Multiple FilesBook Index8.7 Macros

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System