Документ взят из кэша поисковой машины. Адрес оригинального документа : http://comet.sai.msu.ru/UNIXhelp/vi/unix.html
Дата изменения: Fri Jan 17 12:43:27 1997
Дата индексирования: Mon Oct 1 21:22:59 2012
Кодировка:

Поисковые слова: http www.astronomy.ru forum index.php topic 4644.0.html
UNIX shell commands

UNIX shell commands

You can run UNIX commands and see their output without leaving vi. You can also insert the output of a UNIX command into the file you that are editing.

To run a single UNIX command use the command:

   :!UNIX_command

You can start a shell from within vi and use it as you would your usual UNIX environment, then exit the shell and return to vi.

To start up a shell enter the command:

   :sh

The type of shell that is started is determined by the $SHELL variable. You can specify that some other shell is to be started by setting the vi shell option.

Return to using vi by entering the command exit or Ctrl-D.

To insert the output from a UNIX command into a file, immediately after the cursor:

   :r!command

For example, this facility would be very useful if you were using vi to document a UNIX command and you wanted to include examples of the output from this command.


[Home] [Search] [Index]