Je cherche en bash a comparer la taille d'un fichier par rapport a un seuil :
j"ai ceci qui ne fonctionne pas :
 
Code :
 - if [ -f noip.log ]; then
 -     size_log=$(du noip.log)
 -     echo $size_log
 -     if [ $size_log -mt 10000 ]; then
 -         rm noip.log
 -         echo "Log has been cleaned...">>noip.log
 -     fi
 - fi
 
  | 
 
A la ligne qui fait le test  if [ $size_log -lt 10000 ]; then j'ai l'erreur :
Citation :
 
 ./noip.sh: line 13: [: trop d'arguments
   | 
 
Comment on fait punaise ??? Merci parce que la j'en perd mon latin  
 
 
 ---------------
			
Un blog qu'il est bien