With the following litte awk script, I get an email notification.
But I want to get this email only if $1
is greater or equal than 100.
At which position must I put the if statement? I tried many versions without success. Following my script:
awk '
BEGIN{print "Subject:SASL Spam\nFrom:Server.de <test@emailer.com>\nTo:test@emailer.com"}
END{printf("%s\015\n", $1" | "$2)}
' /home/web0/html/tools/uptime/sasl.txt | /usr/lib/sendmail -t test@emailer.com
/home/web0/html/tools/uptime/sasl.txt
so we can understand what you mean.