nushell/docs/commands/uniq.md
JT 8c0a2d3c15
Auto-generate markdown command docs (#4451)
* Finish updating

* a couple improvements

* Update renames

* cleanup examples
2022-02-13 21:22:51 -05:00

781 B

title layout version
uniq command 0.59.0

Return the unique rows.

Signature

> uniq --count --repeated --ignore-case --unique

Parameters

  • --count: Count the unique rows
  • --repeated: Count the rows that has more than one value
  • --ignore-case: Ignore differences in case when comparing
  • --unique: Only return unique values

Examples

Remove duplicate rows of a list/table

> [2 3 3 4] | uniq

Only print duplicate lines, one for each group

> [1 2 2] | uniq -d

Only print unique lines lines

> [1 2 2] | uniq -u

Ignore differences in case when comparing

> ['hello' 'goodbye' 'Hello'] | uniq -i

Remove duplicate rows and show counts of a list/table

> [1 2 2] | uniq -c