Actually, I have been vague and I apologize.
I run commands to a node and pull all the alarms out and redirect to a file. > alarm_sms.txt
I then send to a paging system.
If I have already sent this alarm, I do not want to see it again for 30 minutes (Annoying at 2:30 in the am)
So pull alarms, redirect them to alarm_sms.txt, cat alarm_sms.txt > sms.txt and ftp it over to another node to be sent out.
Next time the script runs 10 minutes later, if it see's that there are alarms in alarm_sms.txt, (using fgrep) it won't put it in the sms.txt file before it sends it.
Then after 30 minutes, it starts all over.
Sorry for being stupid and not explaining what I am actually doing the first few times.