Last active
April 14, 2017 22:03
-
-
Save jvalen/276924b15e293a5d8afc77d1585b5087 to your computer and use it in GitHub Desktop.
Shortcut to generate reply messages to recruiters based on custom templates
This file contains 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 | |
### Recruiter reply | |
# | |
# A quick shortcut to generate reply messages to recruiters | |
# based in text files containing the following tags: | |
# | |
# {{recruiterName}} | |
# {{myName}} | |
# | |
# Feel free to create as much templates as you want | |
# naming them as: n-language.reply | |
# Being "n" the id of the template and "language" an id such as: "en" | |
# | |
# Template example: | |
# | |
# Hi {{recruiterName}}, | |
# | |
# Thanks for reaching out, but this position is not of interest to me. | |
# | |
# Kind regards, | |
# | |
# {{myName}} | |
# | |
### | |
if [[ $# -lt 8 ]]; then | |
echo "Use: -me yourName -re recruiterName -lang language -t templateId" | |
echo "Example: recruiter-reply -me Anna -re Lisa -lang en -t 2" | |
else | |
while [[ $# -gt 1 ]] | |
do | |
key="$1" | |
case $key in | |
-me) | |
MY_NAME="$2" | |
shift | |
;; | |
-re|--recruiter) | |
RECRUITER="$2" | |
shift | |
;; | |
-lang|--language) | |
LANGUAGE="$2" | |
shift | |
;; | |
-t|--template) | |
TEMPLATE_ID="$2" | |
shift | |
;; | |
*) | |
;; | |
esac | |
shift | |
done | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
sed -e "s/{{recruiterName}}/$RECRUITER/g" -e "s/{{myName}}/$MY_NAME/g" "${DIR}"/"${TEMPLATE_ID}"-"${LANGUAGE}".reply | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment