#! /bin/bash /usr/bin/mailq | /bin/grep -v "Mail queue is empty" | /bin/grep -c '^[0-9A-Z]' > /tmp/mailq.dat chmod 644 /tmp/mailq.dat