Skip to content

Instantly share code, notes, and snippets.

@lucazz
Created July 10, 2015 16:23
Show Gist options
  • Save lucazz/1f70b5e8e9ab7918ab3e to your computer and use it in GitHub Desktop.
Save lucazz/1f70b5e8e9ab7918ab3e to your computer and use it in GitHub Desktop.
#!/bin/bash
INPUT=google.csv
OLDIFS=$IFS
IFS=,
[ ! -f $INPUT ] && { echo "$INPUT file not found"; exit 99; }
while read nome sobrenome username passwd email
do
{
echo "Olá, $nome $sobrenome,"
echo "Seguem suas credenciais de acesso para sua conta de email no Google Apps Educational:"
echo "Username: $username"
echo "Password: $passwd"
} | ssmtp $email
done < $INPUT
IFS=$OLDIFS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment