title: compare substrings in Busybox ash
body: <p>I am currently building a POS automation script. The POS terminal has Shell Busybox ash. That's why am not able to use the basic commands, as those are not behaving the same.
  Below is the query :</p>
  <p>Suppose
  <code>[[ $I == $N$A ]]</code> - this comparison is for exact match ,where $I is the bigger string and $N$A contains the substring of $I.
  I have used <code>[ -z ${I##$N$A* ]</code>  and <code>[ “$I” == “$N$A”* ]</code> syntax to compare the substring, but it fails and not behaving as it should.</p>
  <p>Is there any online console for busybox ash where I can test some scripts?</p>
  <h5>Example</h5>
  <p>Suppose -
  the script deriving the value <code>$I = &quot;Credit.saleApproved&quot;</code>
  and I am passing the value for <code>$N= &quot;Credit&quot; and $A= &quot;.sale&quot;</code>.
  So basically echo <code>$N$A</code> is a <em>substring</em> of echo <code>$I</code>.
  I am writing this pseudo logic for your better understanding.</p>
  <pre><code>If  [[ $I == $N$A ]]  
  then  
  echo &quot;sale is complete&quot;  
  else  
  echo &quot;sale is declined&quot;  
  fi   
  </code></pre>
  <p>All I need is --&gt;</p>
  <pre><code>1 . input : $I = Credit.saleApproved  
            $N$A = Credit.sale  
      Output :sale is complete  
  
  2.input : $I = Credit.sApproved  
            $N$A = Credit.sale  
      Output :sale is Declined  
  </code></pre>