Tutorial by Examples

Open3.popen3 or Open3.capture3: Open3 actually just uses Ruby's spawn command, but gives you a much better API. Open3.popen3 Popen3 runs in a sub-process and returns stdin, stdout, stderr and wait_thr. require 'open3' stdin, stdout, stderr, wait_thr = Open3.popen3("sleep 5s && ls&q...
Exec: exec 'echo "hello world"' or exec ('echo "hello world"') The System Command: system 'echo "hello world"' Will output "hello world" in the command window. or system ('echo "hello world"') The system command can return a true if ...

Page 1 of 1