title: Check vim version and python support from a bash script
body: <p>I have a bash script that is dependent on <code>vim</code> being at least version <code>7.4</code> and is installed with python. I need to check if the above condition matches, if not exit and ask user to update their vim. </p>
  
  <p>So far all I can think of is something like below</p>
  
  <pre><code>has_vim = command -v vim &gt;/dev/null  
  
  if ! $has_vim; then
    echo "must have vim installed."
    exit 1
  fi
  
  // Here I want do as the following pseudo code
  vim_info = $(vim --version | grep python)
  
  // suggest me if there is another way
  vim_version = // find version info from $vim_info
  has_python_support = // find python support from $vim_info
  
  if ! $vim_version &gt;= 7.4 &amp;&amp; ! has_python_support; then
    echo "vim version must be at least 7.4 and must be installed with python support"
  fi
  
  // everything is ok. carry on
  </code></pre>
  
  <p>At the moment all I can think of is checking <code>$vim_info</code> for expected vim version and python support. </p>
  
  <p>To boil down the question into meaningful sentence:</p>
  
  <p><strong>How do I check if vim version is greater or equal to 7.4 and has python support from bash script?</strong></p>