title: How to run command inside bash script only during specified period of time?
body: <p>Let say, I need "command" to be run only if current time is from 11:10am till 2:30pm. How this can be done in bash script?</p>
  
  <p>Something like below written in pseudo-language:</p>
  
  <pre><code>#!/bin/bash
  while(1) {
      if ((currentTime &gt; 11:10am) &amp;&amp; (currentTime &lt;2:30pm)) {
          run command;
          sleep 10;
      }
  }
  </code></pre>