Indranil Ganguly Indranil Ganguly - 6 months ago 27
Bash Question

Send Mail using cron job and shell script

I am using cron job to run my shell script after every 2 minutes. My shell script contains pig and hive scripts. I am searching the person with high risk using my hive query and i can get their email id from my hive table, i want to know if i can send mail to the person and how ? I checked on the internet but not able to understand properly, it would be a great help if you guys help me in this. Thanks


This code solves my problem

$ echo "hello world" | mail -s "a subject"