From 597346c2edee9d489d308043b69fc1c4f1acd6cb Mon Sep 17 00:00:00 2001 From: "timeo.collado" Date: Wed, 19 Feb 2025 17:27:09 +0100 Subject: [PATCH] test --- sisr1/tp04_scripts_admin/createGroups.sh | 16 ++++++++++++++++ sisr1/tp04_scripts_admin/createLogins.sh | 16 ---------------- sisr1/tp04_scripts_admin/gitpush.sh | 6 ++++++ 3 files changed, 22 insertions(+), 16 deletions(-) create mode 100644 sisr1/tp04_scripts_admin/createGroups.sh create mode 100644 sisr1/tp04_scripts_admin/gitpush.sh diff --git a/sisr1/tp04_scripts_admin/createGroups.sh b/sisr1/tp04_scripts_admin/createGroups.sh new file mode 100644 index 0000000..4d76d3e --- /dev/null +++ b/sisr1/tp04_scripts_admin/createGroups.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +fichier=./Users.csv + +while read ligne #lis tous les lignes +do + + #A chaque alitéartion, stocker le métier dans $metier + metier=$(echo $ligne | cut -d "," -f5) + echo $metier + if [[ $(grep $metier /etc/group) == "" ]] ; then + groupadd $metier + fi + + +done < $fichier \ No newline at end of file diff --git a/sisr1/tp04_scripts_admin/createLogins.sh b/sisr1/tp04_scripts_admin/createLogins.sh index 3f2bb8f..e69de29 100644 --- a/sisr1/tp04_scripts_admin/createLogins.sh +++ b/sisr1/tp04_scripts_admin/createLogins.sh @@ -1,16 +0,0 @@ -#!bin/bash - -fichier=./Users.csv - -while read ligne #lis tous les lignes -do - - #A chaque alitéartion, stocker le métier dans $metier - metier=$(echo $ligne | cut -d "," -f5) - echo $metier - 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..a2cd914 --- /dev/null +++ b/sisr1/tp04_scripts_admin/gitpush.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +message=$1 +git add . +git commit -m "$message" +git push -u https://timeo.collado@gitea.lyc-lecastel.fr/timeo.collado/siotp.git \ No newline at end of file