ls -l ${1}/${2}/${i}*| awk '{ print $5 " " $6 " " $7 " " $8 " " $9}' | ( while read Taille Mois Jour HeureOuAnnee Fichier
do
DateFichierEntreHierAujourdhui $Mois $Jour $HeureOuAnnee
if [ $? -eq 0 ]
then
NbFicREcu_links=`expr ${NbFicREcu_links} + 1`
fi
done
if [ $NbFicREcu_links -eq 0 ]
then
echo 'i am here 1'
echo ${i}
INT14_KO_FR=1
else
echo 'i am here 2'
fi
)
fi
echo "1- in the end of the fonction INT14_KO_FR=${INT14_KO_FR}"
This piece of code detects if it lacks of specific files. In fact, when we go into the block which prints 'i am here 1', i want to do INT14_KO_FR=1. But when I quit this loop, INT14_KO_FR is always 0, the initial value. The code enter into 'i am here 1' for 2 times. It's really weird, thank u guys for your help