Next: , Previous: , Up: Practicals   [Index]


9.5 Shell Commands

The following shell commands work on generic buffers.

KeysDescription
M-!Calls shell command and prints output
C-u M-!As above, but inserts into buffer
M-&Like M-! but asynchronous
C-u M-&Like C-u M-! but asynchronous
M-pipePipes region to shell command
C-u M-pipeLikes M-pipe, but replaces region

Table 9.1: Shell command key bindings

[ ‘C-u’ ] ‘M-!’ and ‘M-&

Invoke any shell command; output is printed to the mini-buffer if it is only a small amount, or to a dedicated buffer otherwise. Add a prefix argument to insert the output into the buffer.

[ ‘C-u’ ] ‘M-|

Takes the region as input and sends it to the standard input of a shell command, and returns the output to either the mini-buffer or a dedicated buffer. Add a prefix argument to replace the region with the shell output.