how to send mail automatically in unix

Dear friends,

I am storing daily some data in a tape disk. and numbering it from 1 2 3 like this.

I want to get alert mail automatically when ever data is greater than or equal to 600.

to my yahoo mail.

i want to put that mail script in crontab so it will check the data daily at a particular time.

if data crossed 600 it should give mail alert to me.

how to write shell script for this.

please help

Dear friends,

I am storing daily some data in a tape disk. and numbering it from 1 2 3 like this.

I want to get alert mail automatically when ever data is greater than or equal to 600.

to my yahoo mail.

i want to put that mail script in crontab so it will check the data daily at a particular time.

if data crossed 600 it should give mail alert to me.

how to write shell script for this.

please help

rajan_ka1,
Do not bump up posts. Please note that this is against rule 4.

do to check, then

if (( $data > 600 ))
then
echo "Data exceeded 600 count, take action\n\nRegards,\nXYZ" | mailx -s "Subject : Data exceeded 600" youremail@yahoo.com
fi

Dear friend,

I have executed your script.

I have given mailx -s "rajan" id@yahoo.com

at command prompt.

but the error mailx not found was coming.

please give me solution.

regards
rajan

verify that mailx command is in your path (in /usr/bin for exemple)

Dear friend,

In my bin directory mail command is there.

mailx command is not there.

please give solution.

regards
rajan

this script needs to be compiled if the data want to be sent to email..

how if the script running automatically (using schedule)? so we don't need to compile the script anymore...

Thanx all