Полезная информация

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 commandSend buffer object to UNIX command; replace with output.
:n1,n2! commandSend lines n1 -n2 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 (not in all versions).
:so fileRead and execute 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