1
0

dup1.awk 323 B

1234567891011121314
  1. function install(){lastf=$NF; last=$0; split($0,b,"\"")}
  2. $NF!=lastf {if(last!="") print last; install()}
  3. $NF==lastf {split($0,a,"\"")
  4. if(a[6]~/[-,]/||a[6]~/\(mi/) {
  5. split(a[6],aa,"[, ]")
  6. if(index(last,aa[1])==0) {
  7. print last
  8. install()
  9. }
  10. else if(b[6]!~/[,-]/&&b[6]!~/\(mi/)
  11. install()
  12. }
  13. }
  14. END {print last}