awk oneliners

Remove consecutive lines where the 2nd item is the same:

awk '{if($2 != v) print $0; v=$2}'