<?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 question..about parameter in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/question-about-parameter/m-p/4226778#M328113</link>
    <description>if [[ "$PRO_NAME" == "" || "$DIVISION_NAME" == "" ]]; then&lt;BR /&gt; The above line is from one of my script - i get the below error&lt;BR /&gt;syntax error at line 17 : `==' unexpected&lt;BR /&gt;&lt;BR /&gt;In HP is "==" is not the right operand&lt;BR /&gt;pls advice&lt;BR /&gt;Thanks</description>
    <pubDate>Wed, 02 Jul 2008 19:26:59 GMT</pubDate>
    <dc:creator>navin</dc:creator>
    <dc:date>2008-07-02T19:26:59Z</dc:date>
    <item>
      <title>question..about parameter</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/question-about-parameter/m-p/4226778#M328113</link>
      <description>if [[ "$PRO_NAME" == "" || "$DIVISION_NAME" == "" ]]; then&lt;BR /&gt; The above line is from one of my script - i get the below error&lt;BR /&gt;syntax error at line 17 : `==' unexpected&lt;BR /&gt;&lt;BR /&gt;In HP is "==" is not the right operand&lt;BR /&gt;pls advice&lt;BR /&gt;Thanks</description>
      <pubDate>Wed, 02 Jul 2008 19:26:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/question-about-parameter/m-p/4226778#M328113</guid>
      <dc:creator>navin</dc:creator>
      <dc:date>2008-07-02T19:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: question..about parameter</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/question-about-parameter/m-p/4226779#M328114</link>
      <description>Just use one '='&lt;BR /&gt;&lt;BR /&gt;if [[ "${PRO_NAME}" = "" || "${DIVISION_NAME}" = "" ]]; then</description>
      <pubDate>Wed, 02 Jul 2008 19:39:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/question-about-parameter/m-p/4226779#M328114</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2008-07-02T19:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: question..about parameter</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/question-about-parameter/m-p/4226780#M328115</link>
      <description>Hi Havin:&lt;BR /&gt;&lt;BR /&gt;In the Shell, string equality is simply "=".  Non-equality for a string is "!=".&lt;BR /&gt;&lt;BR /&gt;Unfortunately this means in a shell script that the "=" operator is either string equality or an lvalue assignment.  Silly, isn't it?&lt;BR /&gt;&lt;BR /&gt;See the 'test(1)' manpages.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 02 Jul 2008 19:41:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/question-about-parameter/m-p/4226780#M328115</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-07-02T19:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: question..about parameter</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/question-about-parameter/m-p/4226781#M328116</link>
      <description>&amp;gt; In HP is "==" is not the right operand&lt;BR /&gt; &lt;BR /&gt;Actually, this has nothing to do with HP-UX. It is a shell operator and whether it works is completely dependent on the shell (ksh-88, ksh-93, POSIX shell, etc) you are using. HP-UX supplies 5 major shells:&lt;BR /&gt; &lt;BR /&gt;/usr/bin/sh - the POSIX shell, a superset of ksh-88&lt;BR /&gt;/usr/bin/ksh - Korn shell 1988&lt;BR /&gt;/usr/dt/bin/dtksh - Korn shell 1993&lt;BR /&gt;/usr/old/bin/sh - the (old) Bourne shell&lt;BR /&gt;/usr/bin/csh - C shell&lt;BR /&gt; &lt;BR /&gt;And of course, you can add other shells like bash, tcsh, etc. So the question is: what sheel did you specify on line #1 of your script? If nothing was specified, you will get random results. Line #1 should look like this:&lt;BR /&gt; &lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt; &lt;BR /&gt;or for multi-system compatibility, use /bin as in:&lt;BR /&gt; &lt;BR /&gt;#!/bin/ksh&lt;BR /&gt; &lt;BR /&gt;In your example, the test will run perfectly with this line #1:&lt;BR /&gt; &lt;BR /&gt;#!/usr/dt/bin/dtksh&lt;BR /&gt; &lt;BR /&gt;which specifies Korn shell 1993, a more modern and enhanced version of the Korn shell. The == operator replaces = in ksh-93.&lt;BR /&gt;so like grave accents (deprecated in favor of $(...) in POSIX and ksh), now the = sign is deprecated in favor of == for ksh 1993.</description>
      <pubDate>Thu, 03 Jul 2008 00:34:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/question-about-parameter/m-p/4226781#M328116</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2008-07-03T00:34:13Z</dc:date>
    </item>
  </channel>
</rss>

