perl -anwle 'BEGIN{$L = "";} print if $F[0] eq $L; $L = $F[0];' in.txt > out.txt