I have a daily routine task of checking the size of mysql tables in a database in Mysql Database Server.
I want to achieve this task through a bash script that runs daily and calculate the size of mysql tables and finally mail it to DBA email-id fore.g firstname.lastname@example.org
How this could be achieved . Please guide.
I try a simple script to mail but it fails .
SUBJECT="Automated Security Alert"
echo "Security breached!" >> $MESSAGE
echo "Time: `date`" >> $MESSAGE
/bin/mail -s "$SUBJECT" "$TO"
It hangs when I run bash a.sh command. However it creates file in /tmp folder and have all contents.
Thanks & Best Regards