#!/usr/bin/ruby cmd = "#{File.dirname(__FILE__)}/tmp.rb" out = IO.popen(cmd) do |child| until child.eof? puts child.gets end end