#!/usr/local/bin/bash day=$(date +%A) hour=$(date +%H) weekday=true business=true min=6 max=22 if [ ${day:0:1} == "S" ] then weekday=false min=9 max=17 fi if [ $hour -lt $min ] then $business=false elif [ $hour -gt $max ] then $business=false fi echo $business