Last active
June 24, 2020 19:59
-
-
Save atcasanova/01d695846a5bfb02a76a0df77cf9271d to your computer and use it in GitHub Desktop.
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 | |
while read line; do | |
# atribuir dados às variáveis | |
nome=$(echo "$line" | cut -f1 -d";") | |
email=$(echo "$line" | cut -f2 -d";") | |
empresa=$(echo "$line" | cut -f3 -d";") | |
telefone=$(echo "$line" | cut -f4 -d";") | |
filename="$(echo -n "$email" | sha256sum | cut -f1 -d" ").txt" | |
# montar o arquivo | |
echo "Nome: $nome" > $filename | |
echo "E-Mail: $email" >> $filename | |
echo "Empresa: $empresa" >> $filename | |
echo "Telefone: $telefone" >> $filename | |
done < data.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment