diff --git a/sisr1/TP04-Bases-d'administration/Users.csv b/sisr1/TP04-Bases-d'administration/Users.csv new file mode 100644 index 0000000..9dfb324 --- /dev/null +++ b/sisr1/TP04-Bases-d'administration/Users.csv @@ -0,0 +1,30 @@ +Ermengarde,Berthelmot,eberthelmot0@webmd.com,Female,Accountant, +Kassi,Bunker,kbunker1@xinhuanet.com,Female,Production, +Moises,McCallum,mmccallum2@i2i.jp,Male,Production, +Patrizio,Lune,plune3@upenn.edu,Male,Accountant, +Blanch,Everix,beverix4@php.net,Female,Accountant, +Stafani,Kibbel,skibbel5@marriott.com,Female,Production, +Ignacius,Mosdell,imosdell6@cloudflare.com,Male,Management, +Jeana,Waller-Bridge,jwallerbridge7@mapy.cz,Female,Management, +Elroy,Dressel,edressel8@opera.com,Male,Production, +Thea,Strettell,tstrettell9@nature.com,Female,Production, +Solomon,Insoll,sinsolla@utexas.edu,Male,Accountant, +Carri,Feedome,cfeedomeb@ask.com,Female,Accountant, +Padraic,Chetwind,pchetwindc@last.fm,Male,Management, +Solly,D'Ugo,sdugod@uiuc.edu,Male,Production, +Konstanze,MacCostigan,kmaccostigane@seattletimes.com,Female,Accountant, +Roxane,Powlesland,rpowleslandf@pcworld.com,Female,Management, +Orelle,Kennealy,okennealyg@arstechnica.com,Female,Production, +Sukey,Soitoux,ssoitouxh@shinystat.com,Female,Production, +Nelli,Syce,nsycei@blogger.com,Female,Production, +Clarisse,Shillam,cshillamj@dailymotion.com,Female,Production, +Carin,Gueny,cguenyk@naver.com,Female,Management, +Donny,Riepel,driepell@addtoany.com,Male,Production, +Daniella,Ralfe,dralfem@wunderground.com,Female,Production, +Lexy,Clynmans,lclynmansn@furl.net,Female,Production, +Gardiner,Adamthwaite,gadamthwaiteo@spotify.com,Male,Production, +Woodman,Lippett,wlippettp@purevolume.com,Male,Production, +Nadya,Munnion,nmunnionq@flavors.me,Female,Production, +Llewellyn,Habershon,lhabershonr@alibaba.com,Male,Production, +Isaak,Greatrex,igreatrexs@seesaa.net,Male,Production, +Darill,Frostdyke,dfrostdyket@cafepress.com,Male,Production, diff --git a/sisr1/TP04-Bases-d'administration/createGroups.sh b/sisr1/TP04-Bases-d'administration/createGroups.sh new file mode 100644 index 0000000..c636b47 --- /dev/null +++ b/sisr1/TP04-Bases-d'administration/createGroups.sh @@ -0,0 +1,13 @@ +#!/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 + # A chaque itération on stcok le métier dans la variable $métier + metier=$(echo $ligne | cut -d "," -f5) + if [[ $(grep $metier /etc/group) == "" ]] ; then + groupadd $metier + echo "Creasion du groupe $metier" + else + echo "le Groupe $métier existe déjà" + +done < $fichier