UI Deploy

Curated, Short, Web UI Dev we Love.

Capturing stdout & stderr from shell commands via Ruby

If you want to run a shell command from Ruby and capture its stdout, stderr and return status, check out the Open3.capture3  method. If you’d like to process stdout and stderr data in a streaming fashion, check out Open3.popen3.

view source

Advertisement