---
name: "sort-uniq-count"
section: "1"
platform: "linux"
package: "ncbi-entrez-direct"
version: "24.0.20250523+dfsg-1+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/sort-uniq-count"
---

# sort-uniq-count(1)

print line frequencies

## NAME

sort-uniq-count, sort-uniq-count-rank - print line frequencies

## SYNOPSIS

**sort-uniq-count**\[**-rank**\] \[\[**-**\]**b**\] \[\[**-**\]**f**\] \[\[**-**\]**i**\] \[\[**-**\]**n**\] \[\[**-**\]**r**\] \[\[**-**\]**s**\]

## DESCRIPTION

**sort-uniq-count** and **sort-uniq-count-rank** each read a text file on standard input, sort it according to any specified flags (**-f** by default), and report to standard output how often each input line occurs. Each output line consists of a count followed by a tab and an input line.

**sort-uniq-count** produces its output in the user's choice of sort order. **sort-uniq-count-rank** sorts its output primarily from highest to lowest count, with the user's sort order as a tiebreaker.

## OPTIONS

- \[**-**\]**b**

  Ignore leading blanks.

- \[**-**\]**f**

  Ignore capitalization.

- \[**-**\]**i**

  Consider only printable characters.

- \[**-**\]**n**

  Compare according to numerical value.

- \[**-**\]**r**

  Reverse the result of comparisons.

- \[**-**\]**s**

  Stabilize sort.

## SEE ALSO

[**sort**(1)](/sort/1.md), [**xtract**(1)](/xtract/1.md).
