Hi,
I am learning Linux/Bash scripts. Can someone tell me if this answer is correct.?
Thanks
1.How to write a shell script to look into this file and send a birthday-congratulation e-mail to relevant users at 1:00 a.m. every day. Make your script as short as possible. ?
#!/bin/sh
DATE=`date '+%d-%m-%y'`
USERS=`grep $DATE /etc/bithdates awk -v
FS=":" '{ print $1 }'
FOR USER in $USERS
do
echo "Happy birthday !" | mail $USER
done