13 lines
351 B
Bash
13 lines
351 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
# Lecture de la base
|
||
|
request="SELECT email, username FROM auth_user LEFT JOIN gestioncof_cofprofile ON auth_user.id = gestioncof_cofprofile.user_id WHERE mailing_cof=1 AND is_cof = 1;"
|
||
|
echo $request | python manage.py dbshell | \
|
||
|
|
||
|
# Suppression de l'en-tête
|
||
|
tail -n +2 | \
|
||
|
|
||
|
# Suppression des adhérents sans adresse mail
|
||
|
grep -v -P "^\t"
|
||
|
|