Tag Info

New answers tagged

3

uniq is the correct tool for that: uniq -D -f2 file Where: -D prints all dublicates -f2 to avoid to compare the first 2 fields Edit: If the fields 7 and above are not to be compared, you need awk: awk 'n=x[$3,$4,$5,$6]{print n"\n"$0;} {x[$3,$4,$5,$6]=$0;}' file The array item x[] (columns 3-6) is checked. If it's already set run the part in {...} ...



Top 50 recent answers are included