BEGIN { IGNORECASE = 1; # Ignore case in string comparisons. FS = ","; # Initialize the field separator. OFS = ","; # Initialize the output field separator. Sum=0; } NR == 1 { for(I=1; I<=15; I++) { Count[I]=0; } } { Subset=$5 for(I=1; I<=15; I++) { target="-"I"-"; if (index(Subset, target)!=0) { Count[I]++; Sum++; } } } END { print "Average # of Attributes Used:" print Sum/NR print " " print "Average # of Dropped Attributes:" print 15-(Sum/NR) print " " print "Percentage of Times Each Attribute is Dropped:" for(I=1; I<=15; I++) { print I" : " 100*(1-(Count[I]/NR))"%" } }