title: Why can a script with a "#!/bin/sh" shebang use bash-only features?
body: <p>When I run the following script :  </p>
  
  <pre><code>#!/bin/sh
  
  declare path="my.path"
  
  if [[ "$path" =~ \. ]] ; then
      echo "yes"
  else
      echo "no"
  fi
  </code></pre>
  
  <p>I got <code>yes</code> printed.  </p>
  
  <p>But if I am not mistaken, <code>declare</code> and <code>[[ ]]</code> are not available in POSIX shell ; so how come this script does not throw any error ?  </p>
  
  <p>I run the script on git for Windows, could it explain this odd behavior ?</p>