ProcessConnection

ProcessConnection[proc,"stream"]

returns the stream object for a given stream.

Details

  • Possible stream values are:
  • "StandardInput"a stream that can be written to, from which the process will read
    "StandardOutput"a stream that can be read from, to which the process will write
    "StandardError"an error stream that can be read from, to which the process will write

Examples

Basic Examples  (2)

Start the system shell process:

Write a shell command:

Read the shell command output:

Write an invalid shell command:

Use ProcessConnection to read from the standard error stream:

Start the system shell process:

Get the standard input stream using ProcessConnection:

Get the standard output stream using ProcessConnection:

Write two commands into the shell. A process and its streams can be used interchangeably in most cases:

Read the two command outputs:

Introduced in 2014
 (10.0)