fork download
  1. #!/bin/bash
  2.  
  3. Python_Version=$(python --version)
  4. echo ${Python_Version}| grep -E "[A-Za-z ]*[2][0-9 .]*"
  5. if [ $? -eq 0 ] ;then
  6. echo "match found"
  7. else
  8. echo "match not found"
  9. fi
Success #stdin #stdout #stderr 0s 19632KB
stdin
Standard input is empty
stdout
match not found
stderr
Python 2.7.13