I have a mailx statement as part of a shells scipt. It is part of a condtional statement that will send an email every minute if a system is failing.
Is there a way to have mailx check if a mail was send in the last hour and only send if result is false?
tail -1 "/location/of/file.txt" | mail -s "Warning" test@testing.com;
use a file to mark the time you send.
e.g.