title: How do I test if a string starts with another in bash?
body: <p>Very similar but not duplicate : <a href="https://stackoverflow.com/a/2172367/57883">https://stackoverflow.com/a/2172367/57883</a></p>
  
  <p>I'm in Git Bash 3.1 (at least that's what comes up in the prompt when I type bash inside git bash.</p>
  
  <p>and <code>$ test [["DEV-0" == D*]] || echo 'fail'</code> prints fail.</p>
  
  <p><code>if [['DEV-0-1'  == DEV* ]]; then echo "yes";</code> says <code>[[DEV-0-1: command not found</code>
  I'm trying to test if <code>git branch</code> returns something that starts with DEV. but I can't seem to apply the answer. is it because all my attempts are using a string literal on the left instead of a variable value?</p>
  
  <p>I've also tried it on ideone <a href="http://ideone.com/3IyEND" rel="nofollow noreferrer">http://ideone.com/3IyEND</a></p>
  
  <p>and no luck.
  It's been ~14 years since I was good with a linux prompt.</p>
  
  <p>What am I missing for a string starts with test in bash?</p>