Actually
when I schedules this in cronjob as it should mail the value of variable it does not give any value.
However it mails the value when fired manually.
ex.
tot=890
echo $tot |mailx -s total
mailid@domain.com
will mail, blank when added to script and scheduled to cronjob.