Added mcollective 2.3.1 package
[packages/trusty/mcollective.git] / lib / mcollective / vendor / systemu / samples / c.rb
diff --git a/lib/mcollective/vendor/systemu/samples/c.rb b/lib/mcollective/vendor/systemu/samples/c.rb
new file mode 100644 (file)
index 0000000..c3ffc54
--- /dev/null
@@ -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