<?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 Conditional Read statement in Scripting</title>
    <link>https://community.extremenetworks.com/t5/scripting/conditional-read-statement/m-p/20890#M310</link>
    <description>Create Date: Feb 18 2013  9:55AM&lt;BR /&gt;
&lt;BR /&gt;
Hi,&lt;BR /&gt;
&lt;BR /&gt;
In a script I'm working on I want to check if a variable exists and, if not, prompt the user for a value, like this:&lt;BR /&gt;
&lt;BR /&gt;
&lt;DIV class="threadCode"&gt;&lt;B&gt;code:&lt;/B&gt;&lt;PRE spellcheck="false"&gt;if (!$VAREXISTS(oobmgt_mask)) then&lt;BR /&gt;    set var oobmgt_mask $READ(Mask:)&lt;BR /&gt;endif&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;BR /&gt;
But the $READ statement is executed regardless of whether the variable exists or not, but if the variable exists, the value I enter does not get saved to the variable.&lt;BR /&gt;
I've tested the if statement, and it correctly detects if the variable exists or not.&lt;BR /&gt;
&lt;BR /&gt;
Is this a bug or am I doing something wrong?&lt;BR /&gt;
&lt;BR /&gt;
Edit: Perhaps I should mention that I'm running XOS 12.5.3.9 on a Summit X350-48t.&lt;BR /&gt;
&lt;BR /&gt;
Best regards&lt;BR /&gt;
Daniel  (from Daniel_Warhammar)</description>
    <pubDate>Wed, 08 Jan 2014 05:50:00 GMT</pubDate>
    <dc:creator>EtherNation_Use</dc:creator>
    <dc:date>2014-01-08T05:50:00Z</dc:date>
    <item>
      <title>Conditional Read statement</title>
      <link>https://community.extremenetworks.com/t5/scripting/conditional-read-statement/m-p/20890#M310</link>
      <description>Create Date: Feb 18 2013  9:55AM&lt;BR /&gt;
&lt;BR /&gt;
Hi,&lt;BR /&gt;
&lt;BR /&gt;
In a script I'm working on I want to check if a variable exists and, if not, prompt the user for a value, like this:&lt;BR /&gt;
&lt;BR /&gt;
&lt;DIV class="threadCode"&gt;&lt;B&gt;code:&lt;/B&gt;&lt;PRE spellcheck="false"&gt;if (!$VAREXISTS(oobmgt_mask)) then&lt;BR /&gt;    set var oobmgt_mask $READ(Mask:)&lt;BR /&gt;endif&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;BR /&gt;
But the $READ statement is executed regardless of whether the variable exists or not, but if the variable exists, the value I enter does not get saved to the variable.&lt;BR /&gt;
I've tested the if statement, and it correctly detects if the variable exists or not.&lt;BR /&gt;
&lt;BR /&gt;
Is this a bug or am I doing something wrong?&lt;BR /&gt;
&lt;BR /&gt;
Edit: Perhaps I should mention that I'm running XOS 12.5.3.9 on a Summit X350-48t.&lt;BR /&gt;
&lt;BR /&gt;
Best regards&lt;BR /&gt;
Daniel  (from Daniel_Warhammar)</description>
      <pubDate>Wed, 08 Jan 2014 05:50:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/conditional-read-statement/m-p/20890#M310</guid>
      <dc:creator>EtherNation_Use</dc:creator>
      <dc:date>2014-01-08T05:50:00Z</dc:date>
    </item>
    <item>
      <title>RE: Conditional Read statement</title>
      <link>https://community.extremenetworks.com/t5/scripting/conditional-read-statement/m-p/20891#M311</link>
      <description>Create Date: Mar 13 2013  1:21PM&lt;BR /&gt;
&lt;BR /&gt;
I've had this issue as well in 15.2.2.7, so you're not alone.  (from pforristal)</description>
      <pubDate>Wed, 08 Jan 2014 05:50:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/conditional-read-statement/m-p/20891#M311</guid>
      <dc:creator>EtherNation_Use</dc:creator>
      <dc:date>2014-01-08T05:50:00Z</dc:date>
    </item>
  </channel>
</rss>

