Advertisement
Guest User

Untitled

a guest
May 5th, 2019
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Awk 0.22 KB | None | 0 0
  1. #!/usr/bin/gawk -f
  2. {
  3.     if($1 in tomb) {
  4.         if(tomb[$1] > $2)
  5.             tomb[$1] = $2
  6.     }
  7.     else {
  8.         tomb[$1] = $2
  9.     }
  10. }
  11. END{
  12.     for(i in tomb){
  13.         printf("%s %s\n",i,tomb[i])
  14.     }
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement