title: Linux command line get mongodb version
body: <p>I could get the version in command line, but how could I store it in variable:</p>
  
  <pre><code>In [28]: if subprocess.call('mongo --version', shell = True) == '':
     ....:     print 'Not installed'
     ....: else:
               print 'Already installed'
     ....:     print subprocess.call('mongo --version', shell = True)
     ....:     
  MongoDB shell version: 2.6.1
  MongoDB shell version: 2.6.1
  0
  </code></pre>
  
  <p>is it possible to retrive only version value any store it in variable?</p>
  
  <p><code>v = subprocess.call('mongo --version', shell = True)</code> ?</p>