I am new to Linux, I am learning shell scripts.
I wrote another shell script which will alert/ give message from Monday to Friday(5 weekdays) at 8:15 that "Welcome to Work Place"
#!bin/bash
HOUR='date | grep {'echo $4'}'
MINUTE='date |grep {'grep $5'}'
DAY='date | grep ('cal[Mon - Fri]')'
while true; do
if [$HOUR -eq 8] -a [$MINUTE -eq 15]; then
echo $DAY "Welcome to work place"
else
sleep 13500s
fi
done
I got the error message that /date command not found on line 2, 3 and line 4.
I need your assistance and be blessed.


Reply With Quote
Bookmarks