title: Passing BASH arguments
body: <p>[Edit] I've summarized the answer to the following below, the error lies in the line:</p>
  
  <p>[Edit]   <strong>if [$1 ne $value]; then</strong></p>
  
  <hr>
  
  <p>I'm trying to pass a value to a command:</p>
  
  <pre><code>#!/bin/bash
  for value in $(mycommand $1)
  do
      echo Found $value
      if [$1 ne $value]; then
          echo No match!
      if
  done
  </code></pre>
  
  <p>But if I type in the following to execute the script:</p>
  
  <pre><code>#./myscript 25
  </code></pre>
  
  <p>I get the error:</p>
  
  <pre><code>Found somestuff
  ./myscript: 25: command not found
  </code></pre>
  
  <p>What I'd like to do is pass in the first argument of the script ("25" in the example above) and send it to the command 'mycommand'.</p>
  
  <p>How can I do this?</p>