title: bash script testing conditionals on multiple paramters on a string
body: <p>I am working on a bash shell script that tests a string and returns true for the following:</p>
  
  <p>1) Has a minimum of 8 characters</p>
  
  <p>2) Has at least one letter and one number</p>
  
  <p>3) Has both a lowercase and uppercase letter</p>
  
  <p>Through searching I did find how to get the number of characters in a string</p>
  
  <pre><code>srtLen=$(echo -m $str | wc -m)
  </code></pre>
  
  <p>And the if statement would be</p>
  
  <pre><code>if [ $strLen -ge 8 ]; then
    #make bool var true
  fi
  </code></pre>
  
  <p>But I cannot find how to test and return a boolean for if a string has a lower case letter, an uppercase letter and at least one number.  I don't care if each test is separate and I imagine they would be in separate if statements which is why I have mentioned in the code above a boolean variable that will be set based on the conditions.</p>