Skip to main content

uniq Command

The uniq command deduplicates input stream objects.

The final chunk may contain fewer elements than the defined chunk size.

Usage​

uniq

Examples​

Duplicates of the same element are removed
> json [1, 2, 3, 1, 2, 3] | uniq
​1
​2
​3
The same logic applies to JSON objects
> json [{"a": 1, "b": 2}, {"b": 2, "a": 1}] | uniq
​a: 1
​b: 2