Re: [HS] - Script
>LesFichiers=""
>[debut de ma boucle]
> if [ -s $MonFichier ];
> then
> break ou exit 0
> fi
> LesFichiers=$LesFichiers" "$MonFichier
>[fin de ma boucle]
>#si on arrive ici c'est qu'il n'y a pas de fichiers vide
>cp $LesFichiers MaDestination
>
>
Je dois lister 8 fichiers dans un repertoire, si au moins un fichier est vide je ne les copie pas.
Si je comprends bien il faudrait que j'écrive :
myfiles="toto.txt titi.txt tata.txt tonton.txt toto2.txt titi2.txt tata2.txt tonton2.txt"
if [ -s $fileresult ];
then
envoi mail car pas ok
fi
myfiles=$myfiles" "$filesresult
--
Nahliel
Reply to: