perl -anle 'print if $F[0] eq $L; $L = $F[0];' in.txt > out.txt