Skip to content

Instantly share code, notes, and snippets.

@enebo
Created February 25, 2009 20:12
Show Gist options
  • Save enebo/70389 to your computer and use it in GitHub Desktop.
Save enebo/70389 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'open3'
cmd = 'echo hello'
Open3::popen3(cmd) do |stdin, stdout, stderr|
puts stdout.gets
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment