<?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 GAWK : Turning a variable value into a variable name in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/gawk-turning-a-variable-value-into-a-variable-name/m-p/4409052#M682073</link>
    <description>I need to fill in the middle statement in the following GAWK script:&lt;BR /&gt;&lt;BR /&gt;X = "foo"&lt;BR /&gt;# something like @X = 7&lt;BR /&gt;assert( foo == 7 )&lt;BR /&gt;&lt;BR /&gt;in perl I'd just use $$X. Is there a way to do this in GAWK?&lt;BR /&gt;</description>
    <pubDate>Mon, 27 Apr 2009 20:43:34 GMT</pubDate>
    <dc:creator>Andrew Jewell</dc:creator>
    <dc:date>2009-04-27T20:43:34Z</dc:date>
    <item>
      <title>GAWK : Turning a variable value into a variable name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/gawk-turning-a-variable-value-into-a-variable-name/m-p/4409052#M682073</link>
      <description>I need to fill in the middle statement in the following GAWK script:&lt;BR /&gt;&lt;BR /&gt;X = "foo"&lt;BR /&gt;# something like @X = 7&lt;BR /&gt;assert( foo == 7 )&lt;BR /&gt;&lt;BR /&gt;in perl I'd just use $$X. Is there a way to do this in GAWK?&lt;BR /&gt;</description>
      <pubDate>Mon, 27 Apr 2009 20:43:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/gawk-turning-a-variable-value-into-a-variable-name/m-p/4409052#M682073</guid>
      <dc:creator>Andrew Jewell</dc:creator>
      <dc:date>2009-04-27T20:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: GAWK : Turning a variable value into a variable name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/gawk-turning-a-variable-value-into-a-variable-name/m-p/4409053#M682074</link>
      <description>I don't know of any.  You could use associative arrays:&lt;BR /&gt;X = "foo"&lt;BR /&gt;mapVar[X] = 7&lt;BR /&gt;assert(mapVar["foo"] == 7)&lt;BR /&gt;&lt;BR /&gt;I.e. if you want to do the indirection, you always have to use mapVar[].</description>
      <pubDate>Tue, 28 Apr 2009 02:24:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/gawk-turning-a-variable-value-into-a-variable-name/m-p/4409053#M682074</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-04-28T02:24:21Z</dc:date>
    </item>
  </channel>
</rss>

