Advertisement
Guest User

Untitled

a guest
Sep 17th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Awk 0.23 KB | None | 0 0
  1. #!/usr/bin/awk -f
  2. BEGIN {
  3.    FS=","
  4.    x=y=nil
  5.    dup=1
  6. }
  7.  
  8. ($2==x && $3==y){
  9.    if(dup) {
  10.       printf "%s\n%s\n",last,$0;
  11.    } else {
  12.       print $0
  13.    };
  14.    dup=0
  15. }
  16.  
  17. ($2!=x || $3!=y) {dup=1}
  18. {x=$2; y=$3; last=$0}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement