title: How to pass argument to Mongo Script
body: <p>I've been using mongo and script files like this:</p>
  
  <pre><code>$ mongo getSimilar.js
  </code></pre>
  
  <p>I would like to pass an argument to the file:</p>
  
  <pre><code>$ mongo getSimilar.js apples
  </code></pre>
  
  <p>And then in the script file pick up the argument passed in.</p>
  
  <pre><code>var arg  = $1;
  print(arg);
  </code></pre>