Téléverser les fichiers vers "/"

This commit is contained in:
jibril.bouhbas 2024-02-08 14:52:52 +01:00
commit 8cbd2fef56

14
creatLogins.sh Normal file
View File

@ -0,0 +1,14 @@
#!/bin/bash
rm ./logins.csv
while read line
do
echo $line > ./tem.txt
prenom=$(cut -d "," -f 1 ./tem.txt)
nom=$(cut -d "," -f 2 ./tem.txt)
initial=$(cut -c 1 ./tem.txt)
id=$(echo $initial$nom |tr [:upper:] [:lower:])
passwd=$(echo $RANDOM| md5sum | head -c 8)
echo $id","$passwd","$prenom","$nom","$(cut -d"," -f 5 ./tem.txt) >> ./logins.csv
rm ./tem.txt
done < ./Users.csv