logcompress.awk 301 B

123456789101112131415
  1. {
  2. verb[$4] = $3
  3. data[$4] = sprintf("%s %s %s %s %s %s", $5, $6, $7, $8, $9, $10)
  4. }
  5. END{
  6. for(i in verb)
  7. if(verb[i] != "d")
  8. printf("a %s %s\n", i, data[i]) |"sort +1"
  9. close("sort +1")
  10. for(i in verb)
  11. if(verb[i] == "d")
  12. printf("d %s %s\n", i, data[i]) |"sort -r +1"
  13. close("sort -r +1")
  14. }