<?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 Command Substitution in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/command-substitution/m-p/4312572#M683091</link>
    <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;Is nested substitution is possible in shell scripts.&lt;BR /&gt;For example&lt;BR /&gt;VAR=/home/raghul&lt;BR /&gt;VAR1=VAR&lt;BR /&gt;&lt;BR /&gt;And my requirement is, to get the /home/raghul using VAR1 variable.&lt;BR /&gt;i.e&lt;BR /&gt;If I use ${VAR1} will give VAR and it needs to be get expanded to /home/raghul in one command using echo.&lt;BR /&gt;&lt;BR /&gt;Kindly help if it can be possible.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Regards,&lt;BR /&gt;Raghu</description>
    <pubDate>Tue, 25 Nov 2008 13:38:14 GMT</pubDate>
    <dc:creator>Raghu Chikkamenahalli</dc:creator>
    <dc:date>2008-11-25T13:38:14Z</dc:date>
    <item>
      <title>Command Substitution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-substitution/m-p/4312572#M683091</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;Is nested substitution is possible in shell scripts.&lt;BR /&gt;For example&lt;BR /&gt;VAR=/home/raghul&lt;BR /&gt;VAR1=VAR&lt;BR /&gt;&lt;BR /&gt;And my requirement is, to get the /home/raghul using VAR1 variable.&lt;BR /&gt;i.e&lt;BR /&gt;If I use ${VAR1} will give VAR and it needs to be get expanded to /home/raghul in one command using echo.&lt;BR /&gt;&lt;BR /&gt;Kindly help if it can be possible.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Regards,&lt;BR /&gt;Raghu</description>
      <pubDate>Tue, 25 Nov 2008 13:38:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-substitution/m-p/4312572#M683091</guid>
      <dc:creator>Raghu Chikkamenahalli</dc:creator>
      <dc:date>2008-11-25T13:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Command Substitution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-substitution/m-p/4312573#M683092</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Do you mean:&lt;BR /&gt;&lt;BR /&gt;VAR=/home/raghul&lt;BR /&gt;# VAR1=${VAR}&lt;BR /&gt;# echo $VAR1&lt;BR /&gt;/home/raghul&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Tue, 25 Nov 2008 13:43:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-substitution/m-p/4312573#M683092</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-11-25T13:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: Command Substitution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-substitution/m-p/4312574#M683093</link>
      <description>Try this: &lt;BR /&gt;&lt;BR /&gt;VAR=/home/raghul&lt;BR /&gt;VAR1=$VAR&lt;BR /&gt;echo $VAR1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;ivan</description>
      <pubDate>Tue, 25 Nov 2008 13:43:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-substitution/m-p/4312574#M683093</guid>
      <dc:creator>Ivan Krastev</dc:creator>
      <dc:date>2008-11-25T13:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: Command Substitution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-substitution/m-p/4312575#M683094</link>
      <description>Tried this option VAR1=${VAR1} before this post. &lt;BR /&gt;let us say, script check.sh &lt;BR /&gt;&lt;BR /&gt;cat check.sh&lt;BR /&gt;------------------------------------------&lt;BR /&gt;HOME_PATH="/home/raghul"&lt;BR /&gt;&lt;BR /&gt;VAR=${1}  &lt;BR /&gt;&lt;BR /&gt;echo ${VAR}&lt;BR /&gt;&lt;BR /&gt;------------------------------------------&lt;BR /&gt;Now If I execute the program&lt;BR /&gt;$./check.sh HOME_PATH, &lt;BR /&gt;The echo statement should display /home/raghul.&lt;BR /&gt;===&amp;gt; ${${VAR}} &lt;BR /&gt;===&amp;gt; ${HOME_PATH}&lt;BR /&gt;===&amp;gt; /home/raghul&lt;BR /&gt;I am extremly sorry if my first question is not clear or deviated from my requirement. The requirement is explained in the second one.&lt;BR /&gt;&lt;BR /&gt;Kindly guide me.&lt;BR /&gt;&lt;BR /&gt;Many Thanks,&lt;BR /&gt;Regards,&lt;BR /&gt;Raghu.&lt;BR /&gt;</description>
      <pubDate>Tue, 25 Nov 2008 16:13:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-substitution/m-p/4312575#M683094</guid>
      <dc:creator>Raghu Chikkamenahalli</dc:creator>
      <dc:date>2008-11-25T16:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: Command Substitution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-substitution/m-p/4312576#M683095</link>
      <description>Hi (again) Raghu:&lt;BR /&gt;&lt;BR /&gt;Try this:&lt;BR /&gt;&lt;BR /&gt;# cat .check.sh&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;HOME_PATH="/home/raghul"&lt;BR /&gt;VAR=\${$1}&lt;BR /&gt;eval echo ${VAR}&lt;BR /&gt;&lt;BR /&gt;# .check.sh HOME_PATH&lt;BR /&gt;/home/raghul&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 25 Nov 2008 16:31:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-substitution/m-p/4312576#M683095</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-11-25T16:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: Command Substitution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-substitution/m-p/4312577#M683096</link>
      <description>Hi JRF,&lt;BR /&gt;&lt;BR /&gt;Incredible, Thanks for the solution.&lt;BR /&gt;&lt;BR /&gt;Many Thanks,&lt;BR /&gt;Regards,&lt;BR /&gt;Raghu.</description>
      <pubDate>Tue, 25 Nov 2008 16:52:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-substitution/m-p/4312577#M683096</guid>
      <dc:creator>Raghu Chikkamenahalli</dc:creator>
      <dc:date>2008-11-25T16:52:00Z</dc:date>
    </item>
  </channel>
</rss>

