title: Limit bash while loop to 10 retries
body: <p>How can this while loop be limited to maximum 10 retries?</p>
  
  <pre><code>#!/bin/sh
  while ! test -d /somemount/share/folder
  do
      echo "Waiting for mount /somemount/share/folder..."
      sleep 1
  done
  </code></pre>