<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Use content of variables to get content of variable in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/use-content-of-variables-to-get-content-of-variable/m-p/4946614#M91070</link>
    <description>Hi Rodney:&lt;BR /&gt;&lt;BR /&gt;Why thanks :-))&lt;BR /&gt;&lt;BR /&gt;/* No points for either of my posts, please! */&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Tue, 13 Dec 2005 18:06:37 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2005-12-13T18:06:37Z</dc:date>
    <item>
      <title>Use content of variables to get content of variable</title>
      <link>https://community.hpe.com/t5/operating-system-linux/use-content-of-variables-to-get-content-of-variable/m-p/4946611#M91067</link>
      <description>I have a function which will accept two variables:&lt;BR /&gt;type &lt;BR /&gt;dest&lt;BR /&gt;&lt;BR /&gt;Then I have a bunch of variable pre-define such as:&lt;BR /&gt;cku=1234567890@txt.domain&lt;BR /&gt;&lt;BR /&gt;The content of "type" will be "c".&lt;BR /&gt;The content of "dest" will be "ku"&lt;BR /&gt;&lt;BR /&gt;So I want to display teh content of varible "cku" by concatenating the contents of "type" and "dest".&lt;BR /&gt;&lt;BR /&gt;I've tried&lt;BR /&gt;echo "${${type}${dest}}" and other forms to try and get the content of "cku" displayed.&lt;BR /&gt;&lt;BR /&gt;I will use this in a more complicated script which is why I'm not simply doing&lt;BR /&gt;  echo "${cku}"&lt;BR /&gt;&lt;BR /&gt;Can I use the content of 2 variables to build the name of the third variable and then display the content of that 3rd variable?&lt;BR /&gt;&lt;BR /&gt;Cheers</description>
      <pubDate>Tue, 13 Dec 2005 17:49:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/use-content-of-variables-to-get-content-of-variable/m-p/4946611#M91067</guid>
      <dc:creator>OFC_EDM</dc:creator>
      <dc:date>2005-12-13T17:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: Use content of variables to get content of variable</title>
      <link>https://community.hpe.com/t5/operating-system-linux/use-content-of-variables-to-get-content-of-variable/m-p/4946612#M91068</link>
      <description>Use the "eval" command.&lt;BR /&gt;x=${type}${dest}&lt;BR /&gt;eval echo \$$x&lt;BR /&gt;  &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Tue, 13 Dec 2005 17:56:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/use-content-of-variables-to-get-content-of-variable/m-p/4946612#M91068</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2005-12-13T17:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: Use content of variables to get content of variable</title>
      <link>https://community.hpe.com/t5/operating-system-linux/use-content-of-variables-to-get-content-of-variable/m-p/4946613#M91069</link>
      <description>Hi Kevin:&lt;BR /&gt;&lt;BR /&gt;I don't believe that the shell provides this kind of substitution.  One sure wishes that it did.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 13 Dec 2005 18:01:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/use-content-of-variables-to-get-content-of-variable/m-p/4946613#M91069</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-12-13T18:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: Use content of variables to get content of variable</title>
      <link>https://community.hpe.com/t5/operating-system-linux/use-content-of-variables-to-get-content-of-variable/m-p/4946614#M91070</link>
      <description>Hi Rodney:&lt;BR /&gt;&lt;BR /&gt;Why thanks :-))&lt;BR /&gt;&lt;BR /&gt;/* No points for either of my posts, please! */&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 13 Dec 2005 18:06:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/use-content-of-variables-to-get-content-of-variable/m-p/4946614#M91070</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-12-13T18:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Use content of variables to get content of variable</title>
      <link>https://community.hpe.com/t5/operating-system-linux/use-content-of-variables-to-get-content-of-variable/m-p/4946615#M91071</link>
      <description>Thanks Rodney.&lt;BR /&gt;The eval works on it's own.&lt;BR /&gt;&lt;BR /&gt;But how can I plug that into a command?&lt;BR /&gt;&lt;BR /&gt;Example&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;mailx -s " some text " eval echo \$$x&lt;BR /&gt;&lt;BR /&gt;Where it would result in&lt;BR /&gt;mailx -s "some text"  1234567890@txt.domain</description>
      <pubDate>Tue, 13 Dec 2005 18:13:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/use-content-of-variables-to-get-content-of-variable/m-p/4946615#M91071</guid>
      <dc:creator>OFC_EDM</dc:creator>
      <dc:date>2005-12-13T18:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: Use content of variables to get content of variable</title>
      <link>https://community.hpe.com/t5/operating-system-linux/use-content-of-variables-to-get-content-of-variable/m-p/4946616#M91072</link>
      <description>Got it working.&lt;BR /&gt;&lt;BR /&gt;Will post solution and assign points ASAP</description>
      <pubDate>Tue, 13 Dec 2005 18:18:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/use-content-of-variables-to-get-content-of-variable/m-p/4946616#M91072</guid>
      <dc:creator>OFC_EDM</dc:creator>
      <dc:date>2005-12-13T18:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: Use content of variables to get content of variable</title>
      <link>https://community.hpe.com/t5/operating-system-linux/use-content-of-variables-to-get-content-of-variable/m-p/4946617#M91073</link>
      <description>This is a shortened version of my much longer script but has the basic logic and shows how the eval statement allows using 2 variables to get the content of a 3rd variable.&lt;BR /&gt;&lt;BR /&gt;--- start of script&lt;BR /&gt;cku="1234567890@txt.cellprovider.com"&lt;BR /&gt;eku="ku@emailaddress.com"&lt;BR /&gt;&lt;BR /&gt;escalate() {&lt;BR /&gt;# format&lt;BR /&gt;# escalate type destination_name message&lt;BR /&gt;&lt;BR /&gt;nf_dest="${1}${2}"&lt;BR /&gt;nf_body="$3"&lt;BR /&gt;&lt;BR /&gt;#Purposely not using subject line in mailx&lt;BR /&gt;echo "${3}" | eval mailx \$${nf_dest}&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;# Sample calls to function&lt;BR /&gt;escalate c ku "test message to cell"&lt;BR /&gt;escalate e ku "test message to email"&lt;BR /&gt;&lt;BR /&gt;--- end of script&lt;BR /&gt;</description>
      <pubDate>Wed, 14 Dec 2005 18:22:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/use-content-of-variables-to-get-content-of-variable/m-p/4946617#M91073</guid>
      <dc:creator>OFC_EDM</dc:creator>
      <dc:date>2005-12-14T18:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: Use content of variables to get content of variable</title>
      <link>https://community.hpe.com/t5/operating-system-linux/use-content-of-variables-to-get-content-of-variable/m-p/4946618#M91074</link>
      <description>see above</description>
      <pubDate>Thu, 17 Apr 2008 11:16:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/use-content-of-variables-to-get-content-of-variable/m-p/4946618#M91074</guid>
      <dc:creator>OFC_EDM</dc:creator>
      <dc:date>2008-04-17T11:16:35Z</dc:date>
    </item>
  </channel>
</rss>

