[chef] How can I store the output of a bash command as a ruby variable?


Chronological Thread 
  • From: Geoff Meakin Acid < >
  • To:
  • Subject: [chef] How can I store the output of a bash command as a ruby variable?
  • Date: Thu, 29 Sep 2011 09:46:22 +0100

Hi,

Is there a chef way to store the output of a bash command as a ruby variable?

Or should I use plain old ruby?

E.g. I want to do this:

$ hostname -d

- and store the result in a variable, which I can pass via variables to a template.

Thanks

Geoff





Archive powered by MHonArc 2.6.16.

§