<?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 If sentence .... (using or parameter) in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/if-sentence-using-or-parameter/m-p/4982505#M420168</link>
    <description>is correct the following sentence with if command?&lt;BR /&gt;&lt;BR /&gt;if [[ $6 != "a.sh" ]] || [[ $6 != "b.sh" ]]&lt;BR /&gt;then &lt;BR /&gt;echo "Im in the function..."&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;$6 = hola&lt;BR /&gt;why enter program if $6 is hola and not b.sh or a.sh?&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 01 Jun 2006 16:54:50 GMT</pubDate>
    <dc:creator>Manuales</dc:creator>
    <dc:date>2006-06-01T16:54:50Z</dc:date>
    <item>
      <title>If sentence .... (using or parameter)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/if-sentence-using-or-parameter/m-p/4982505#M420168</link>
      <description>is correct the following sentence with if command?&lt;BR /&gt;&lt;BR /&gt;if [[ $6 != "a.sh" ]] || [[ $6 != "b.sh" ]]&lt;BR /&gt;then &lt;BR /&gt;echo "Im in the function..."&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;$6 = hola&lt;BR /&gt;why enter program if $6 is hola and not b.sh or a.sh?&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 01 Jun 2006 16:54:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/if-sentence-using-or-parameter/m-p/4982505#M420168</guid>
      <dc:creator>Manuales</dc:creator>
      <dc:date>2006-06-01T16:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: If sentence .... (using or parameter)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/if-sentence-using-or-parameter/m-p/4982506#M420169</link>
      <description>First, never test a variable that might be null test "${6}" rather than ${6}&lt;BR /&gt;&lt;BR /&gt;Second, your syntax is bad.&lt;BR /&gt;&lt;BR /&gt;if [[ "${6}" != "a.sh" || "${6}" != "b.sh" ]]&lt;BR /&gt;then &lt;BR /&gt;...&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;OR&lt;BR /&gt;if [ "${6}" != "a.sh" -o "${6}" != "b.sh" ]&lt;BR /&gt;then &lt;BR /&gt;...&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;finally you have a logical error&lt;BR /&gt;&lt;BR /&gt;${6} is always going to not equal one of your constants so the statement will always be true. You probably meant AND rather than OR so substitute "&amp;amp;&amp;amp;" for "||" or "-o" for "-a".&lt;BR /&gt;&lt;BR /&gt;The [[ ]] style if statement is more efficient because it is evaluated directly by the shell (Korn or POSIX) whereas the more traditional [ ] style is evaluated by the external test command.&lt;BR /&gt;</description>
      <pubDate>Thu, 01 Jun 2006 17:05:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/if-sentence-using-or-parameter/m-p/4982506#M420169</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-06-01T17:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: If sentence .... (using or parameter)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/if-sentence-using-or-parameter/m-p/4982507#M420170</link>
      <description>THANKS A LOT !!!&lt;BR /&gt;&lt;BR /&gt;Manuales :=)</description>
      <pubDate>Thu, 01 Jun 2006 17:23:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/if-sentence-using-or-parameter/m-p/4982507#M420170</guid>
      <dc:creator>Manuales</dc:creator>
      <dc:date>2006-06-01T17:23:30Z</dc:date>
    </item>
  </channel>
</rss>

