Skip to content
quotesby

About this quote

What does it mean?
You can filter duplicate error messages using the uniq command.
In plain terms
Use uniq to remove duplicate stderr output.
What can you take from it?
Clean up error logs by deduplication.

Where it applies

  • debugging sessions
  • log monitoring

Putting it to work

  • pipe stderr to uniq
  • script log cleanup

Questions to consider

  • How do you handle unsorted duplicates?
  • What are alternatives to uniq?

Another view

uniq only works on sorted input, so unsorted errors may remain duplicated.

More from Larry Wall

  1. Not that I have anything much against redundancy. But I said that already.

    Permalink to quote #73
  2. I'd put my money where my mouth is, but my mouth keeps moving.

    Permalink to quote #75
  3. So far we've managed to avoid turning Perl into APL. :-)

    Permalink to quote #72

Related quotes

  1. In general, if you think something isn't in Perl, try it out, because it usually is. :-)

    Larry WallLarry Wall quote #33
  2. ...this does not mean that some of us should not want, in a rather dispassionate sort of way, to put a bullet through csh's head.

    Larry WallLarry Wall quote #55
  3. Premature optimization is the root of all evil (or at least most of it) in programming.

    Donald KnuthDonald Knuth quote #1