<?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: ${X_${Y}} in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/x-y/m-p/2558310#M725022</link>
    <description>Arrays in shell:&lt;BR /&gt;&lt;BR /&gt;set -A x&lt;BR /&gt;&lt;BR /&gt;x[1]=jjjjjj&lt;BR /&gt;x[2]=yyyyyy&lt;BR /&gt;&lt;BR /&gt;y=2&lt;BR /&gt;&lt;BR /&gt;echo ${x[$y]}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 30 Jul 2001 10:46:23 GMT</pubDate>
    <dc:creator>Carlos Fernandez Riera</dc:creator>
    <dc:date>2001-07-30T10:46:23Z</dc:date>
    <item>
      <title>${X_${Y}}</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/x-y/m-p/2558302#M725014</link>
      <description>Hi&lt;BR /&gt;   In shell can we do something of the kind&lt;BR /&gt;&lt;BR /&gt;${X_${Y}}   to print the value of X_2 when $Y=2&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 29 Jul 2001 12:53:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/x-y/m-p/2558302#M725014</guid>
      <dc:creator>Praveen Bezawada</dc:creator>
      <dc:date>2001-07-29T12:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: ${X_${Y}}</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/x-y/m-p/2558303#M725015</link>
      <description>Hi Praveen:&lt;BR /&gt;&lt;BR /&gt;While this seems intuitive. I don't think this will work.  From the 'sh-posix' man pages in the parameter substitution discussion you can note: "The shell reads all the characters from ${ to the matching } as part of the same word, even if it contains braces or metacharacters."&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 29 Jul 2001 13:54:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/x-y/m-p/2558303#M725015</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-07-29T13:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: ${X_${Y}}</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/x-y/m-p/2558304#M725016</link>
      <description>No, it is not possible.&lt;BR /&gt;&lt;BR /&gt;Cheers...&lt;BR /&gt;Satish.</description>
      <pubDate>Sun, 29 Jul 2001 14:43:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/x-y/m-p/2558304#M725016</guid>
      <dc:creator>Satish Y</dc:creator>
      <dc:date>2001-07-29T14:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: ${X_${Y}}</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/x-y/m-p/2558305#M725017</link>
      <description>Hi Praveen:&lt;BR /&gt;&lt;BR /&gt;Another comment: You could consider setting and referencing your variables in an array.&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Sun, 29 Jul 2001 14:55:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/x-y/m-p/2558305#M725017</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-07-29T14:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: ${X_${Y}}</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/x-y/m-p/2558306#M725018</link>
      <description>Hi Praveen:&lt;BR /&gt;&lt;BR /&gt;One other option you have is to set up associative arrays in awk so that your values are no referenced by numerical values but rather by strings such as "X1","X2","red","Blue".&lt;BR /&gt;&lt;BR /&gt;Regards, Clay</description>
      <pubDate>Sun, 29 Jul 2001 19:18:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/x-y/m-p/2558306#M725018</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-07-29T19:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: ${X_${Y}}</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/x-y/m-p/2558307#M725019</link>
      <description>Why not use $X_$Y or $X_${Y} directly ?&lt;BR /&gt;&lt;BR /&gt;The shell will try its best to explain the variable !</description>
      <pubDate>Mon, 30 Jul 2001 00:48:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/x-y/m-p/2558307#M725019</guid>
      <dc:creator>Frank Li</dc:creator>
      <dc:date>2001-07-30T00:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: ${X_${Y}}</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/x-y/m-p/2558308#M725020</link>
      <description>what you need to use is "eval"&lt;BR /&gt;&lt;BR /&gt;eval print \"\$X_$Y\"&lt;BR /&gt;&lt;BR /&gt;sometimes it is easier not to mess with the quotes and do something like&lt;BR /&gt;&lt;BR /&gt;eval z=\$X_$Y&lt;BR /&gt;print $z</description>
      <pubDate>Mon, 30 Jul 2001 01:54:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/x-y/m-p/2558308#M725020</guid>
      <dc:creator>Curtis Larson</dc:creator>
      <dc:date>2001-07-30T01:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: ${X_${Y}}</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/x-y/m-p/2558309#M725021</link>
      <description>Hi Praveen,&lt;BR /&gt;&lt;BR /&gt;Try the following , it works :&lt;BR /&gt;&lt;BR /&gt;echo ${X}_${Y}&lt;BR /&gt;&lt;BR /&gt;Magdi</description>
      <pubDate>Mon, 30 Jul 2001 05:26:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/x-y/m-p/2558309#M725021</guid>
      <dc:creator>Magdi KAMAL</dc:creator>
      <dc:date>2001-07-30T05:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: ${X_${Y}}</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/x-y/m-p/2558310#M725022</link>
      <description>Arrays in shell:&lt;BR /&gt;&lt;BR /&gt;set -A x&lt;BR /&gt;&lt;BR /&gt;x[1]=jjjjjj&lt;BR /&gt;x[2]=yyyyyy&lt;BR /&gt;&lt;BR /&gt;y=2&lt;BR /&gt;&lt;BR /&gt;echo ${x[$y]}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 30 Jul 2001 10:46:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/x-y/m-p/2558310#M725022</guid>
      <dc:creator>Carlos Fernandez Riera</dc:creator>
      <dc:date>2001-07-30T10:46:23Z</dc:date>
    </item>
  </channel>
</rss>

