Hi.
I have a script like this:
nawk 'BEGIN {FS=","; TOT1=0; REJ1=0;} {
if($7=="TOTAL") { TOT1=TOT1 +$8}
if($7=="REJS") { REJ1=REJ1 +$8}
}' FILE_123.dat
and what I need is to be able to use the values stored in TOT1 and REJ1 in the unix env to compare them and decide if send an email or not like this:
if [ $REJ1 > $TOT1/30 ] { mailx xxxxxxxxxx }
How can I read/use those values out of the awk?
Thanks.