I have the following logic in my bash script:
#!/bin/bash local_time=$(date +%H%M) if (( ( local_time > 1430 && local_time < 2230 ) || ( local_ti
Following the advice from this blog, this works:
#!/bin/bash local_time=`date +%H%M` local_time="$(( 10#$local_time ))" if (( ( local_time > 1430 && local_time < 2230 ) || ( local_time > 0300 && local_time < 0430 ) )); then echo "it is time!" fi