| Extracted from Pike v7.8 release 866 at 2018-07-18.

[Top]
Process

# Method Process.popen()

Method popen

  `string popen(string command)`

Description

  Executes command as a shell statement ("`/bin/sh -c <font face='courier'><a href='../../predef_3A_3A/Process/popen.html'>command` " for Unix, "`cmd /c <font face='courier'><a href='../../predef_3A_3A/Process/popen.html'>command` " for Windows), waits until it has finished and returns the result as a string.

See also

  system , spawn

Method popen

  `Stdio.FILE popen(string command, string mode)`

Description

  Open a "process" for reading or writing. The command is executed as a shell statement ("`/bin/sh -c <font face='courier'><a href='../../predef_3A_3A/Process/popen.html'>command` " for Unix, "`cmd /c <font face='courier'><a href='../../predef_3A_3A/Process/popen.html'>command` " for Windows). The parameter mode should be one of the following letters:

  `"r"` | Open for reading. Data written by the process to stdout is available for read.
  `"w"` | Open for writing. Data written to the file is available to the process on stdin.

See also

  system , spawn