#!/bin/bash
if [ `date +%u` -lt 6 && `date +%H` == '19' ] ; then
echo 'Sorry, you cannot run this program today.'
else
echo 'yes, you can run today'
fi
The script above is to run a program on weekdays and every 7PM. I have check the spaces and it still return error : date.sh: 2: [: missing ]