Projet

Général

Profil

Révision ba89ed20

IDba89ed208b53768bae3a4424104b5d6f2bb2429e
Parent cdb9a445
Enfant 68980ed2

Ajouté par Lars Kruse il y a plus de 5 ans

Plugin amavis_awk: improve variable names

Voir les différences:

plugins/amavis/amavis_awk
69 69

  
70 70

  
71 71
$LOGTAIL ${MAIL_LOG} $STATEFILE | \
72
awk 'BEGIN { na= 0; nb= 0; nc= 0; nd= 0; total= 0 }
72
awk 'BEGIN { clean_count=0; passed_spam_count=0; blocked_spam_count=0; infected_count=0; total=0 }
73 73

  
74 74
	{
75 75

  
76
               if (index($0, "Passed CLEAN")) { na++ ; total++ }
77
               else if (index($0, "Passed SPAMMY")) { nb++ ; total++ }
78
               else if (index($0, "Blocked SPAMMY")) { nc++ ; total++ }
79
               else if (index($0, "INFECTED")) { nd++ ; total++ }
76
               if (index($0, "Passed CLEAN")) { clean_count++ ; total++ }
77
               else if (index($0, "Passed SPAMMY")) { passed_spam_count++ ; total++ }
78
               else if (index($0, "Blocked SPAMMY")) { blocked_spam_count++ ; total++ }
79
               else if (index($0, "INFECTED")) { infected_count++ ; total++ }
80 80
	}
81
	END { print "clean.value " na"\np_spam.value " nb"\nb_spam.value " nc"\nvirus.value " nd"\ntotal.value " total }'
82

  
83

  
81
	END { print "clean.value " clean_count"\np_spam.value " passed_spam_count"\nb_spam.value " blocked_spam_count"\nvirus.value " infected_count"\ntotal.value " total }'

Formats disponibles : Unified diff