<?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: difference between $LOGDIR and ${LOGDIR} ? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/difference-between-logdir-and-logdir/m-p/4941830#M411828</link>
    <description>Hi Sammy:&lt;BR /&gt;&lt;BR /&gt;As noted, bounding your variable names with curly braces avoids ambiguitites in what you versus the shell interpret as the variable name.&lt;BR /&gt;&lt;BR /&gt;Personally, I consider it simply good practice to always encapsulate variables within curly braces in shell programming.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Fri, 18 Nov 2005 15:50:49 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2005-11-18T15:50:49Z</dc:date>
    <item>
      <title>difference between $LOGDIR and ${LOGDIR} ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/difference-between-logdir-and-logdir/m-p/4941826#M411824</link>
      <description>Is there a difference in parentheses being out as oppose to not having them at all.&lt;BR /&gt;we are trying to run a job via cron. (hpux 11.11)and have a mixture of these parentheses and want to make sure we get the same result in all cron entries.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please explain.</description>
      <pubDate>Fri, 18 Nov 2005 14:55:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/difference-between-logdir-and-logdir/m-p/4941826#M411824</guid>
      <dc:creator>Sammy_2</dc:creator>
      <dc:date>2005-11-18T14:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: difference between $LOGDIR and ${LOGDIR} ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/difference-between-logdir-and-logdir/m-p/4941827#M411825</link>
      <description>Usually they are used when the variable is embedded with other text.&lt;BR /&gt;&lt;BR /&gt;example-&lt;BR /&gt;echo ${LOGDIR}A $LOGDIRA&lt;BR /&gt; &lt;BR /&gt;Will display variable LOGDIR followed with an A, while LOGDIRA the shell will think it is the variable name.&lt;BR /&gt; &lt;BR /&gt;{} are also used for arrays and some other operations that are available on variables. See man ksh for more.&lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills&lt;BR /&gt;and&lt;BR /&gt;${LOGDIR}A</description>
      <pubDate>Fri, 18 Nov 2005 15:14:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/difference-between-logdir-and-logdir/m-p/4941827#M411825</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2005-11-18T15:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: difference between $LOGDIR and ${LOGDIR} ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/difference-between-logdir-and-logdir/m-p/4941828#M411826</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;It is used for defining a new variable according to the value of previous variable. By defining it like this shell understand that this is a variable previously defined.&lt;BR /&gt;&lt;BR /&gt;For ex.&lt;BR /&gt;server1:/home/hp/&amp;gt;&amp;gt;export LOGNAME=123&lt;BR /&gt;server1:/home/hp&amp;gt;&amp;gt;echo $LOGNAME&lt;BR /&gt;123&lt;BR /&gt;server1:/home/hp&amp;gt;&amp;gt;export LOGNAME1=${LOGNAME}newlogname&lt;BR /&gt;server1:/home/hp&amp;gt;&amp;gt;echo $LOGNAME1&lt;BR /&gt;123newlogname&lt;BR /&gt;&lt;BR /&gt;(The value is new variable is appended to previous value of similar variable)&lt;BR /&gt;&lt;BR /&gt;Some scripting experts will describe it better otherwise.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Devender</description>
      <pubDate>Fri, 18 Nov 2005 15:26:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/difference-between-logdir-and-logdir/m-p/4941828#M411826</guid>
      <dc:creator>Devender Khatana</dc:creator>
      <dc:date>2005-11-18T15:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: difference between $LOGDIR and ${LOGDIR} ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/difference-between-logdir-and-logdir/m-p/4941829#M411827</link>
      <description>If you use the {}'s each and every time, you will never get into trouble (parsing-wise); the converse is not true. It's a very good habit to learn.</description>
      <pubDate>Fri, 18 Nov 2005 15:48:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/difference-between-logdir-and-logdir/m-p/4941829#M411827</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-11-18T15:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: difference between $LOGDIR and ${LOGDIR} ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/difference-between-logdir-and-logdir/m-p/4941830#M411828</link>
      <description>Hi Sammy:&lt;BR /&gt;&lt;BR /&gt;As noted, bounding your variable names with curly braces avoids ambiguitites in what you versus the shell interpret as the variable name.&lt;BR /&gt;&lt;BR /&gt;Personally, I consider it simply good practice to always encapsulate variables within curly braces in shell programming.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 18 Nov 2005 15:50:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/difference-between-logdir-and-logdir/m-p/4941830#M411828</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-11-18T15:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: difference between $LOGDIR and ${LOGDIR} ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/difference-between-logdir-and-logdir/m-p/4941831#M411829</link>
      <description>Also note you're asking about braces (i.e. {}), not parentheses (i.e. ()). Big difference in how the shell interprets these. It's best to say what you mean in cases where you aren't typing what you're really referencing.&lt;BR /&gt;&lt;BR /&gt;${something} represents the value of the some variable.&lt;BR /&gt;&lt;BR /&gt;$(something) represents executing whatever "something" is. This is also represented as `something` in older shells and is still used for backwards compatibility.</description>
      <pubDate>Fri, 18 Nov 2005 15:53:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/difference-between-logdir-and-logdir/m-p/4941831#M411829</guid>
      <dc:creator>Jeff_Traigle</dc:creator>
      <dc:date>2005-11-18T15:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: difference between $LOGDIR and ${LOGDIR} ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/difference-between-logdir-and-logdir/m-p/4941832#M411830</link>
      <description>Point taken. thanks to Rod and Devender for providing examples which was reinforced by JRF and Clay. Jeff made another good pt about parentheses.&lt;BR /&gt;&lt;BR /&gt;Thanks to all</description>
      <pubDate>Fri, 18 Nov 2005 16:11:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/difference-between-logdir-and-logdir/m-p/4941832#M411830</guid>
      <dc:creator>Sammy_2</dc:creator>
      <dc:date>2005-11-18T16:11:53Z</dc:date>
    </item>
  </channel>
</rss>

