diff --git a/sisr1/tp04-scripts-admin/createLogins.sh b/sisr1/tp04-scripts-admin/createLogins.sh new file mode 100644 index 0000000..fe1f567 --- /dev/null +++ b/sisr1/tp04-scripts-admin/createLogins.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +fichier="./Users.csv" + +while read ligne #définit la variable "ligne" comme le contenu de la ligne du fichier en cours de lecture +do + metier=$(echo $ligne | cut -d "," -f5) + if [[ $(grep $metier /etc/group) == "" ]] ; then + groupadd $metier + fi + +done < $fichier \ No newline at end of file diff --git a/sisr1/tp04-scripts-admin/gitpush.sh b/sisr1/tp04-scripts-admin/gitpush.sh new file mode 100644 index 0000000..9b9a883 --- /dev/null +++ b/sisr1/tp04-scripts-admin/gitpush.sh @@ -0,0 +1,5 @@ +#!/bin/bash +message=$1 +git add . +git commit -m "$message" +git push -u https://charlie.alves@gitea.lyc-lecastel.fr/charlie.alves/siotp.git \ No newline at end of file