[chef] Re: access output from command prompts


Chronological Thread 
  • From: "Stewart, Curtis" < >
  • To: " " < >
  • Subject: [chef] Re: access output from command prompts
  • Date: Wed, 7 May 2014 12:35:25 +0000
  • Accept-language: en-US
  • Authentication-results: spf=none (sender IP is ) ;

Ganesan,

It all depends on the specific situation.  If you happen to be using the Mixlib::ShellOut class, the output of the run_command can be read with the #stdout method.  This class also offers a :input option as part of the initializer that should pass any input into STDIN when running a command (http://www.rubydoc.info/github/opscode/mixlib-shellout/Mixlib/ShellOut#input-instance_method).  I recommend checking out the Mixlib::ShellOut class if you haven’t already.

Hope this helps!


Curtis Stewart
Consultant
m 217.390.5067
Skype cstewart8710

 




Cloud Migration - Architecture - DevOps - Big Data - App Dev


hi,

Can Ruby access output from command prompts as it appears?

Thanks and Regards,
Ganesan.A




Archive powered by MHonArc 2.6.16.

§