Creates a pipe and executes a command
Creates a pipe and executes a command. Mode can be one of:
"r" - The calling process can read the spawned command’s standard output via the returned stream. This is the default.
"w" - The calling process can write to the spawned command’s standard input via the returned stream.
"b" - Open in binary mode.
"t" - Open in text mode.
However io.popen is not supported under the version compiled into MUSHclient, so don't get too excited. :)
This is an example of using popen under the Linux Lua executable:
An alternative to using pipes, if you want to capture operating system output, is to redirect command output to a temporary file, like this:
See Also ...
f:close - Closes a file
Lua base functions
(Help topic: lua=io.popen)
Enter a search string to find matching documentation.
Gammon Software support
Forum RSS feed ( https://gammon.com.au/rss/forum.xml )