Bonjour,
je souhaite récuperer le champs $2 sous certaines conditions :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
 for nom in $(awk 'BEGIN{FS=";"}{print $1}' < verif2.log )
 do
 
 for compte in $(awk 'BEGIN{FS=";"}{print $1}' < verif1.txt )
 
 do
 
if [ $nom = $compte ]
 then
# awk 'BEGIN{FS=";" ; nom_exp=$nom }{$1 == nom_exp} {print $2}' verif1.txt > resultat_final.log
# awk '{if ($1 == $nom) {print $2} fi }' verif1.txt > resultat_final.log
 fi
 done
 done
Merci pour la réponse