<?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: problem with validation in a IF in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-validation-in-a-if/m-p/3297750#M880587</link>
    <description>You need a space between the [ and the $user_id</description>
    <pubDate>Mon, 07 Jun 2004 09:36:20 GMT</pubDate>
    <dc:creator>Mark Grant</dc:creator>
    <dc:date>2004-06-07T09:36:20Z</dc:date>
    <item>
      <title>problem with validation in a IF</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-validation-in-a-if/m-p/3297749#M880586</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;i'm trying to validate a login in a IF statement but it's not working.  What i'm doing is:&lt;BR /&gt;&lt;BR /&gt;user_id=`whoami`&lt;BR /&gt;&lt;BR /&gt;if [$user_id = "bsp" ]&lt;BR /&gt;elist=bsp@domain.com&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;i've tried single quotes, double quotes and no quotes but it does not work.&lt;BR /&gt;&lt;BR /&gt;I know that user_id=`whoami` works and that if i do elist=`whoami`@domain.com works also, the only thing i want to validate is if user_id = bsp&lt;BR /&gt;&lt;BR /&gt;I know that it's probably a stupid syntax error that i'm doing but can't see what.&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;&lt;BR /&gt;PB</description>
      <pubDate>Mon, 07 Jun 2004 09:31:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-validation-in-a-if/m-p/3297749#M880586</guid>
      <dc:creator>Patrice Blanchard_2</dc:creator>
      <dc:date>2004-06-07T09:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: problem with validation in a IF</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-validation-in-a-if/m-p/3297750#M880587</link>
      <description>You need a space between the [ and the $user_id</description>
      <pubDate>Mon, 07 Jun 2004 09:36:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-validation-in-a-if/m-p/3297750#M880587</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-06-07T09:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: problem with validation in a IF</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-validation-in-a-if/m-p/3297751#M880588</link>
      <description>Hi, &lt;BR /&gt;&lt;BR /&gt;it didn't do anything.&lt;BR /&gt;&lt;BR /&gt;I did:&lt;BR /&gt;&lt;BR /&gt;if [ $user_id="bsp" ]&lt;BR /&gt;elist=bsp@domain.com&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;&lt;BR /&gt;PB</description>
      <pubDate>Mon, 07 Jun 2004 09:50:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-validation-in-a-if/m-p/3297751#M880588</guid>
      <dc:creator>Patrice Blanchard_2</dc:creator>
      <dc:date>2004-06-07T09:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: problem with validation in a IF</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-validation-in-a-if/m-p/3297752#M880589</link>
      <description>If it didn't do anything then I would guess that the user id is not "bsp".&lt;BR /&gt; &lt;BR /&gt;Maybe you have the wrong ` marks around your whoami command.  Try the less confusing&lt;BR /&gt; &lt;BR /&gt;user_id=$(whoami) &lt;BR /&gt; &lt;BR /&gt;If not do this&lt;BR /&gt; &lt;BR /&gt;user_id=$(whoami)&lt;BR /&gt; &lt;BR /&gt;echo "user id is $userid"&lt;BR /&gt; &lt;BR /&gt;if [ $user_id = "bsp" ]&lt;BR /&gt;then ### OOPS, you missed out this bit too&lt;BR /&gt; elist=bsp@domain&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;echo "elist is $elist"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 07 Jun 2004 09:55:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-validation-in-a-if/m-p/3297752#M880589</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-06-07T09:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: problem with validation in a IF</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-validation-in-a-if/m-p/3297753#M880590</link>
      <description>worked.  &lt;BR /&gt;Thanks</description>
      <pubDate>Mon, 07 Jun 2004 10:23:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-validation-in-a-if/m-p/3297753#M880590</guid>
      <dc:creator>Patrice Blanchard_2</dc:creator>
      <dc:date>2004-06-07T10:23:44Z</dc:date>
    </item>
  </channel>
</rss>

