http://qs321.pair.com?node_id=174161


in reply to Re: At each change in...
in thread At each change in...

Why not just use the program uniq? It would appear to perform the same function as you desire, and is perhaps more recognizable when reading.