- 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
- [chef] Listing files in cookbook/files/default/, Jason J. W. Williams, 09/24/2011
- [chef] Re: Listing files in cookbook/files/default/, Denis Barishev, 09/25/2011
- [chef] Re: Listing files in cookbook/files/default/, Joshua Timberman, 09/25/2011
- [chef] Re: Re: Listing files in cookbook/files/default/, Jason J. W. Williams, 09/25/2011
- [chef] Re: Re: Listing files in cookbook/files/default/, Jason J. W. Williams, 09/27/2011
- [chef] Re: Re: Re: Listing files in cookbook/files/default/, Adam Jacob, 09/27/2011
- [chef] Re: Re: Re: Re: Listing files in cookbook/files/default/, Jason J. W. Williams, 09/27/2011
- [chef] Re: Re: Re: Re: Re: Listing files in cookbook/files/default/, Adam Jacob, 09/27/2011
- [chef] How can I store the output of a bash command as a ruby variable?, Geoff Meakin Acid, 09/29/2011
- [chef] Re: How can I store the output of a bash command as a ruby variable?, Akzhan Abdulin, 09/29/2011
- [chef] Re: Re: How can I store the output of a bash command as a ruby variable?, Bryan McLellan, 09/29/2011
- [chef] Knifing multiple different chef servers, Geoff Meakin Acid, 09/29/2011
- [chef] Re: Knifing multiple different chef servers, Bryan Brandau, 09/29/2011
- [chef] Re: Re: Knifing multiple different chef servers, KC Braunschweig, 09/30/2011
- [chef] Re: Re: Re: Knifing multiple different chef servers, Joshua Timberman, 09/30/2011
- [chef] Re: How can I store the output of a bash command as a ruby variable?, Geoff Meakin Acid, 09/29/2011
Archive powered by MHonArc 2.6.16.