GNU Info

Info Node: (screen.info)Using Exec

(screen.info)Using Exec


Prev: Exec Up: Subprocess Execution
Enter node , (file) or (file)node

Using Exec
==========

Abbreviations:

   * Whitespace between the word `exec' and FDPAT and the command name
     can be omitted.

   * Trailing dots and a FDPAT consisting only of dots can be omitted.

   * A simple `|' is synonymous for the `!..|' pattern.

   * The word `exec' can be omitted when the `|' abbreviation is used.

   * The word `exec' can always be replaced by leading `!'.

Examples:

`!/bin/sh'
`exec /bin/sh'
`exec ... /bin/sh'
     All of the above are equivalent.  Creates another shell in the
     same window, while the original shell is still running. Output of
     both shells is displayed and user input is sent to the new
     `/bin/sh'.

`!!stty 19200'
`exec!stty 19200'
`exec !.. stty 19200'
     All of the above are equivalent.  Set the speed of the window's
     tty. If your stty command operates on stdout, then add another
     `!'. This is a useful command, when a screen window is directly
     connected to a serial line that needs to be configured.

`|less'
`exec !..| less'
     Both are equivalent.  This adds a pager to the window output. The
     special character `|' is needed to give the user control over the
     pager although it gets its input from the window's process. This
     works, because `less' listens on stderr (a behavior that `screen'
     would not expect without the `|') when its stdin is not a tty.
     `Less' versions newer than 177 fail miserably here; good old `pg'
     still works.

`!:sed -n s/.*Error.*/\007/p'
     Sends window output to both, the user and the sed command. The sed
     inserts an additional bell character (oct. 007) to the window
     output seen by screen.  This will cause 'Bell in window x'
     messages, whenever the string `Error' appears in the window.


automatically generated by info2www version 1.2.2.9