<div dir="ltr">Thanks Doug,<div><br></div><div>I knew there would be a more definitive and simple use. </div><div>eval is that way!<br></div><div><br></div><div>Ronald</div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div style="font-family:arial;font-size:small">Ronald Bradford</div><div style="font-family:arial;font-size:small"><br></div><span style="color:rgb(102,102,102)">Web Site: </span><a style="color:rgb(102,102,102)" href="http://ronaldbradford.com/" target="_blank">http://ronaldbradford.com</a><br style="color:rgb(102,102,102)">
<span style="color:rgb(102,102,102)">LinkedIn: </span><a style="color:rgb(102,102,102)" href="http://www.linkedin.com/in/ronaldbradford" target="_blank">http://www.linkedin.com/in/ronaldbradford</a><br><span style="color:rgb(102,102,102)">Twitter: </span><a style="color:rgb(102,102,102)" href="http://twitter.com/ronaldbradford" target="_blank">@RonaldBradford</a><br>
<span style="color:rgb(102,102,102)">Skype: RonaldBradford</span><div><span style="color:rgb(102,102,102)">GTalk: Ronald.Bradford<br></span><div><span style="color:rgb(102,102,102)">IRC: rbradfor<br></span><br></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Tue, May 26, 2015 at 1:19 PM, Doug Hellmann <span dir="ltr"><<a href="mailto:doug@doughellmann.com" target="_blank">doug@doughellmann.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Excerpts from Ronald Bradford's message of 2015-05-26 11:18:09 -0400:<br>
<span class="">> Hi list,<br>
><br>
> I came across the following neutron client specific syntax and decided to<br>
> see if I could reproduce using the openstack client and it's flexible<br>
> formatting capabilities<br>
><br>
><br>
> $ NIC_ID1=$(neutron net-show public | awk '/ id /{print $4}')<br>
><br>
> $ echo $NIC_ID1<br>
> 210d976e-16a3-42dc-ac31-f01810dbd297<br>
><br>
> I can get similar syntax (unfortunately lowercase variable name only) with:<br>
> NOTE: It may be nice to be able to pass an option to UPPERCASE all shell<br>
> variables names.<br>
><br>
> $ openstack network show public -c id --format shell --prefix nic_<br>
> nic_id="210d976e-16a3-42dc-ac31-f01810dbd297"<br>
><br>
> However to use this I effectively have to place in a file and source that<br>
> file to expose this variable to my current running shell.<br>
> Reproducing the same syntax does not work obviously.<br>
<br>
</span>It's actually meant to be used with an eval statement:<br>
<br>
$ eval $(openstack network show public -c id --format shell --prefix nic_)<br>
$ echo $nic_id<br>
<br>
Doug<br>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div><br></div>