Pipe:read([ delay ]) method

Reads from the Pipe (from the stdout and stderr of the executed process).

Parameters

[ delay ]

An optional number representing the delay to wait before reading, in milliseconds, defaulting to 100

Return value

Returns a Task instance.
Once finished, the Task will return a string or nil if the executed process has been terminated.

Example

local pipe = sys.Pipe('cmd /K dir /B') -- Shows current directory content local output = await(pipe:read()) print(output)