Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BEGIN{
- arr2[1]="Mon"
- arr2[2]="SKK"
- arr2[3]="Huragan"
- arr2[4]="Nowa"
- }
- {
- if(($3=="Mon" && $10>$11) || ($7=="Mon" && $11>$10))
- a++
- if(($3=="SKK" && $10>$11) || ($7=="SKK" && $11>$10))
- b++
- if(($4=="Huragan" && $10>$11) || ($8=="Huragan" && $11>$10))
- c++
- if(($4=="Nowa" && $10>$11) || ($8=="Nowa" && $11>$10))
- d++
- }
- END{
- arr[1]=a
- arr[2]=b
- arr[3]=c
- arr[4]=d
- for(i=1;i<5;i++){
- print arr2[i] arr[i]
- }
- for(i=1;i<5;i++){
- for(j=2;j<5;j++){
- if(arr[j-1]>arr[j]){
- e=arr[j-1]
- arr[j-1]=arr[j]
- arr[j]=e
- f=arr2[j-1]
- arr2[j-1]=arr2[j]
- arr2[j]=f
- }
- }
- }
- for(i=1;i<5;i++){
- print arr2[i] arr[i]
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement