|
There won't be a single man page that will cover it, as what you want to do requires two operations (or three, as in the above version).
Sed is a powerful stream editor -- the man page only touches the surface of what it is capable of. The best thing to do is to google for Sed tutorials and how-to's, and have a play with it on you own system.
The other two parts are standard *nix commands. The 'uniq' utility does exactly what you think it should, i.e. remove successive duplicate lines from the input stream (see man uniq). For this to work, the input needs to be sorted, thus the 'sort' command.
Cheers,
mj
|