Last active
September 15, 2016 20:21
-
-
Save kondor6c/4bcf83dcef4362cf9b60cfb9f503062b to your computer and use it in GitHub Desktop.
Idea, I'm too stupid to remember to send a good morning text/message, so I automated it in a fun way
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 | |
ARRAY_OF_COMPLIMENTS=( 'You are beautiful', 'You are doing great', 'I love you', 'Why do you love cats?', 'Your morning kitty', 'I hope this serves as a replacement for a real cat', 'I really really love you', 'you are purrrrfect, straight from a hallmark card', 'I appreciate you', 'Hope you have a great day', 'Hanging out with you is always a blast', 'You are wonderful', 'you are one of a kind', 'You should be appreciated more, this is an attempt', 'you are cuter than a bunch of cats', 'you are my reason to smile', 'I love it when you tell me I am so clever', 'you are really something special', 'You are a gift to those around you' ) | |
RANDOM_TIME=$(shuf -i 0-2345 -n 1) | |
sleep $RANDOM_TIME | |
LENGTH_OF_COMPLIMENTS=${#ARRAY_OF_COMPLIMENTS[@]} | |
RANDOM_COMPLIMENT_NUMBER=$(shuf -i 0-$LENGTH_OF_COMPLIMENTS -n 1) | |
COMPLIMENT_TO_ISSUE="${ARRAY_OF_COMPLIMENTS[${RANDOM_COMPLIMENT_NUMBER}]}" | |
echo $COMPLIMENT_TO_ISSUE | |
mailx -a 'Content-Type: text/html' -s "Good morning Brittany" [email protected] << EOM | |
<html> | |
<body> | |
<h2>This is Brittany's Morning Kitty and Compliment from Kevin</h2> | |
<p>$(echo "$COMPLIMENT_TO_ISSUE")</p> | |
<br> | |
$(curl -L 'http://thecatapi.com/api/images/get?format=html&api_key=MTE4NTQx') | |
CKC | |
</body> | |
</html> | |
EOM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment