summaryrefslogtreecommitdiff
path: root/samples/c.rb
blob: c3ffc544e0a96e490fe09cf48ce6146ad4dc2885 (plain)
1
2
3
4
5
6
7
8
9
10
#
# of course stdin can be supplied too.  synonyms for 'stdin' include '0' and
# 0.  the other stdio streams have similar shortcuts
#
  require 'systemu'

  cat = %q( ruby -e"  ARGF.each{|line| puts line}  " )

  status = systemu cat, 0=>'the stdin for cat', 1=>stdout=''
  puts stdout