Created
January 26, 2018 17:47
-
-
Save mrpossoms/1aaf779a33f1733833dbeac4432bcdef to your computer and use it in GitHub Desktop.
Script for sending email alerts from a unix cli
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
msg_file=/tmp/$(hexdump -n 16 -e '4/4 "%08X" 1 "\n"' /dev/random).mail | |
echo "subject:ping" > $msg_file | |
echo $1 >> $msg_file | |
sendmail $1 [email protected] < $msg_file | |
rm $msg_file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment