#!/bin/bash for etab in $(python3 find_individus.py -t current_etabs) do ldapsearch -LLL -x -b "ou=$etab,ou=tst-colleges,ou=education,o=gouv,c=fr" uid | grep -q uid res=$? if [ $res -eq 0 ] then echo $etab fi done exit 0