Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- if [[ $(comm -13 fast.log.old fast.log | grep 'Priority: 1') ]]; then
- comm -13 fast.log.old fast.log | grep 'Priority: 1' | mail -s "alerts from $(hostname)" me@email.com
- cp fast.log fast.log.old
- else
- echo "no new alerts found"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement