From: John Doe <jdmls@xxxxxxxxx> > A quick and dirty example (only prints the extra duplicate lines; not the > original duplicate): > awk -F: ' { v[$3]=v[$3]+1; if (v[$3]>1) print $0; } ' datafile Here's the version will the 1st duplicate included: awk -F: ' { v[$3]=v[$3]+1; if (v[$3] == 1) { f[$3]=$0; } else { if (v[$3] == 2) print f[$3]; print $0; } } ' datafile _______________________________________________ CentOS mailing list CentOS@xxxxxxxxxx http://lists.centos.org/mailman/listinfo/centos