X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=lib%2Fmcollective%2Fvendor%2Fsystemu%2Fsamples%2Fc.rb;fp=lib%2Fmcollective%2Fvendor%2Fsystemu%2Fsamples%2Fc.rb;h=c3ffc544e0a96e490fe09cf48ce6146ad4dc2885;hb=b87d2f4e68281062df1913440ca5753ae63314a9;hp=0000000000000000000000000000000000000000;hpb=ab0ea530b8ac956091f17b104ab2311336cfc250;p=packages%2Fprecise%2Fmcollective.git diff --git a/lib/mcollective/vendor/systemu/samples/c.rb b/lib/mcollective/vendor/systemu/samples/c.rb new file mode 100644 index 0000000..c3ffc54 --- /dev/null +++ b/lib/mcollective/vendor/systemu/samples/c.rb @@ -0,0 +1,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