<?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 Runtime Variable Value in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/runtime-variable-value/m-p/3957727#M761453</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;i have the following variables,&lt;BR /&gt;&lt;BR /&gt;pri_running=0&lt;BR /&gt;var_running=pri_running&lt;BR /&gt;&lt;BR /&gt;how can i set value of pri_running = 5 &lt;BR /&gt;using the variable "var_running" ? &lt;BR /&gt;&lt;BR /&gt;is it possible?&lt;BR /&gt;</description>
    <pubDate>Wed, 07 Mar 2007 19:55:30 GMT</pubDate>
    <dc:creator>uform</dc:creator>
    <dc:date>2007-03-07T19:55:30Z</dc:date>
    <item>
      <title>Runtime Variable Value</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/runtime-variable-value/m-p/3957727#M761453</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;i have the following variables,&lt;BR /&gt;&lt;BR /&gt;pri_running=0&lt;BR /&gt;var_running=pri_running&lt;BR /&gt;&lt;BR /&gt;how can i set value of pri_running = 5 &lt;BR /&gt;using the variable "var_running" ? &lt;BR /&gt;&lt;BR /&gt;is it possible?&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Mar 2007 19:55:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/runtime-variable-value/m-p/3957727#M761453</guid>
      <dc:creator>uform</dc:creator>
      <dc:date>2007-03-07T19:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime Variable Value</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/runtime-variable-value/m-p/3957728#M761454</link>
      <description>No that can not be done.&lt;BR /&gt;&lt;BR /&gt;But why don't you try to explain the problem you are really trying to solve.&lt;BR /&gt;&lt;BR /&gt;Also, in what context is that variable used?&lt;BR /&gt;&lt;BR /&gt;I guess you intent a SHELL variable (which shell?)&lt;BR /&gt;&lt;BR /&gt;But it could be C or AWK or whatever based on the limited description you provided.&lt;BR /&gt;&lt;BR /&gt;In Perl things along those line can be done using REFERENCES.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Mar 2007 20:55:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/runtime-variable-value/m-p/3957728#M761454</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2007-03-07T20:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime Variable Value</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/runtime-variable-value/m-p/3957729#M761455</link>
      <description>Sure!  That can be a handy trick at times.  The secret is the "eval" built-in command:&lt;BR /&gt;&lt;BR /&gt;$ var_running=pri_running&lt;BR /&gt;$ eval ${var_running}=5  &lt;BR /&gt;$ echo $pri_running      &lt;BR /&gt;5&lt;BR /&gt;&lt;BR /&gt;The eval basically tells the shell to expand the variables before evaluating the expressions.  To use a variable within an eval you would need to escape the $:&lt;BR /&gt;&lt;BR /&gt;$ eval new_var=\$${var_running}&lt;BR /&gt;$ echo $new_var&lt;BR /&gt;5&lt;BR /&gt;&lt;BR /&gt;I will warn you that self-modifying shell scripts can lead to madness (or at least hair loss).&lt;BR /&gt;&lt;BR /&gt;Bob</description>
      <pubDate>Wed, 07 Mar 2007 23:11:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/runtime-variable-value/m-p/3957729#M761455</guid>
      <dc:creator>Bob E Campbell</dc:creator>
      <dc:date>2007-03-07T23:11:25Z</dc:date>
    </item>
  </channel>
</rss>

