Re: [HS] - Script
Merci beaucoup pour ton aide Gregory.
J'ai donc réecrit le script en suivant test conseils, mais j'ai cette erreur
./testficvide.sh: line 10: `$FILESRESULT': not a valid identifier
on peut copier les fichiers
Voici ce que j'ai réecrit propre en suivant tes derniers mails.
myfiles="toto.txt titi.txt tata.txt tonton.txt toto2.txt titi2.txt"
for $FILESRESULT in [/app/crunch/temp]/*
do
if [ -s $FILESRESULT ];
then
echo "Au moins un fichier à une taille null" | \
mail -s "Compte rendu de traitement." moi@mondomain.com
exit 0 #0 pour éviter à cron d'envoyer son message d'erreur
standard
fi
MYFILES=$MYFILES" "$FILESRESULT
done
echo "on peut copier les fichiers"
(j'ai mis un echo pour ne pas faire la copie tout de suite)
--
Nahliel
Reply to: