<?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: bash: unbound variable in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/bash-unbound-variable/m-p/2868345#M97779</link>
    <description>///define greg//&lt;BR /&gt;&lt;BR /&gt;greg=test&lt;BR /&gt;or &lt;BR /&gt;greg=test1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;if [ $greg = "test" ]&lt;BR /&gt;then&lt;BR /&gt;echo "greg equal to test"&lt;BR /&gt;else&lt;BR /&gt;echo "greg not equal to test"&lt;BR /&gt;fi&lt;BR /&gt;</description>
    <pubDate>Fri, 20 Dec 2002 04:28:23 GMT</pubDate>
    <dc:creator>T G Manikandan</dc:creator>
    <dc:date>2002-12-20T04:28:23Z</dc:date>
    <item>
      <title>bash: unbound variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bash-unbound-variable/m-p/2868342#M97776</link>
      <description>when I execute a shell script containing:&lt;BR /&gt;(and expecting to get one of the two statements echoed)&lt;BR /&gt;&lt;BR /&gt;if [ $greg = "test" ]; then&lt;BR /&gt;   echo "greg equal to test"&lt;BR /&gt;else&lt;BR /&gt;   echo "greg not equal to test"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;I get:&lt;BR /&gt;bash: greg: unbound variable&lt;BR /&gt;&lt;BR /&gt;Can anyone explain what's the deal there?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Dec 2002 03:36:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bash-unbound-variable/m-p/2868342#M97776</guid>
      <dc:creator>Greg B_1</dc:creator>
      <dc:date>2002-12-20T03:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: bash: unbound variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bash-unbound-variable/m-p/2868343#M97777</link>
      <description>how shell is supposed to find greg? you are defining it anywhere in the script.&lt;BR /&gt;&lt;BR /&gt;It should be&lt;BR /&gt;grep=test&lt;BR /&gt;if [ $greg = "test" ]; then &lt;BR /&gt;echo "greg equal to test" &lt;BR /&gt;else &lt;BR /&gt;echo "greg not equal to test" &lt;BR /&gt;fi &lt;BR /&gt;&lt;BR /&gt;This will give greg eqal to test</description>
      <pubDate>Fri, 20 Dec 2002 04:02:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bash-unbound-variable/m-p/2868343#M97777</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2002-12-20T04:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: bash: unbound variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bash-unbound-variable/m-p/2868344#M97778</link>
      <description>An unbound variable is one that has not been defined.&lt;BR /&gt;&lt;BR /&gt;Try checking for existence of the variable using the test -z option before doing any comparison:&lt;BR /&gt;if [ -z $greg ]; then&lt;BR /&gt;....&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Dec 2002 04:21:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bash-unbound-variable/m-p/2868344#M97778</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2002-12-20T04:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: bash: unbound variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bash-unbound-variable/m-p/2868345#M97779</link>
      <description>///define greg//&lt;BR /&gt;&lt;BR /&gt;greg=test&lt;BR /&gt;or &lt;BR /&gt;greg=test1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;if [ $greg = "test" ]&lt;BR /&gt;then&lt;BR /&gt;echo "greg equal to test"&lt;BR /&gt;else&lt;BR /&gt;echo "greg not equal to test"&lt;BR /&gt;fi&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Dec 2002 04:28:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bash-unbound-variable/m-p/2868345#M97779</guid>
      <dc:creator>T G Manikandan</dc:creator>
      <dc:date>2002-12-20T04:28:23Z</dc:date>
    </item>
  </channel>
</rss>

