This shows you the differences between two versions of the page.
| — |
commands:exec [2010-01-26 16:38] (current) asciiphil created |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== exec ====== | ||
| + | |||
| + | ===== Default Keybindings ===== | ||
| + | |||
| + | None. | ||
| + | |||
| + | ===== Syntax ===== | ||
| + | |||
| + | * '' | ||
| + | |||
| + | ===== Description ===== | ||
| + | |||
| + | Run a unix subprocess (specified by an executable path // | ||
| + | its optional arguments) in the current window. | ||
| + | // | ||
| + | the window (let us call it " | ||
| + | (window) is controlled by the file descriptor pattern // | ||
| + | pattern is basically a three character sequence representing stdin, stdout | ||
| + | and stderr of newcommand. | ||
| + | '' | ||
| + | connected to the application-process. | ||
| + | User input will go to // | ||
| + | application-process' | ||
| + | '':'' | ||
| + | end of //fdpat//. | ||
| + | |||
| + | Invoking '' | ||
| + | currently running subprocess in this window. | ||
| + | can be running in each window. | ||
| + | '' | ||
| + | |||
| + | Refer to the postscript file {{: | ||
| + | of all 21 possible combinations. | ||
| + | representing the three file descriptors of newcommand. | ||
| + | is the usual pty that has the application-process on its slave side. The | ||
| + | box marked " | ||
| + | side. | ||
| + | |||
| + | === Abbreviations === | ||
| + | |||
| + | Whitespace between the word '' | ||
| + | omitted. | ||
| + | omitted. | ||
| + | word '' | ||
| + | |||
| + | ===== Examples ===== | ||
| + | |||
| + | < | ||
| + | exec ... /bin/sh | ||
| + | exec /bin/sh | ||
| + | !/bin/sh | ||
| + | </ | ||
| + | |||
| + | Creates another shell in the same window, while the original shell is | ||
| + | still running. | ||
| + | to the new ''/ | ||
| + | |||
| + | < | ||
| + | exec !.. stty 19200 | ||
| + | exec ! stty 19200 | ||
| + | !!stty 19200 | ||
| + | </ | ||
| + | |||
| + | Set the speed of the window' | ||
| + | stdout, then add another "'' | ||
| + | |||
| + | < | ||
| + | exec !..| less | ||
| + | |less | ||
| + | </ | ||
| + | |||
| + | This adds a pager to the window output. | ||
| + | needed to give the user control over the pager although it gets its input | ||
| + | from the window' | ||
| + | (a behavior that '' | ||
| + | stdin is not a tty. Less versions newer than 177 fail miserably here; | ||
| + | good old '' | ||
| + | |||
| + | < | ||
| + | !:sed -n s/ | ||
| + | </ | ||
| + | |||
| + | Sends window output to both the user and the '' | ||
| + | inserts an additional bell character (oct. 007) to the window output seen | ||
| + | by '' | ||
| + | the string " | ||
| + | |||
| + | ===== See Also ===== | ||
| + | |||
| + | * [[:Misc]] | ||