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


Chronological Thread 
  • From: Akzhan Abdulin < >
  • To:
  • Subject: [chef] Re: How can I store the output of a bash command as a ruby variable?
  • Date: Thu, 29 Sep 2011 13:44:22 +0400

v = `hostname -d`

but you should look at ohai attributes before.

2011/9/29 Geoff Meakin Acid < "> >
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.

§