NLM logo


This documentation reflects EDirect version 10.9, released on 2/1/2019.

We strive to keep this documentation up-to-date with the latest release. If you are looking for documentation on a more recent version of EDirect, or to find out more about new EDirect releases, please see the Release Notes of NCBI's EDirect documentation.

The sort-uniq-count-rank command combines a series of Unix commands (including sort and uniq) to sort a series of lines of text alphabetically, grouping together the duplicate lines. The function then counts how many occurrences there are of each unique line, removes all duplicate lines, and then sorts the list of unique lines by how frequently they occur, from most frequent to least frequent. The numerical frequency count is also displayed.


One or more lines of text.


One or more unique lines of text, accompanied by frequency counts, sorted from most frequent to least frequent.


The sort-uniq-count-rank command does not accept arguments.


Given a series of rows of text (for example, a list of author names):

Noy S
Iverson GL
Del Bigio MR
Sawyer Q
Vesci B
Zukerman SL
Iverson GL
Wallace PW
Stern RA
Noy S
Baugh CM

The sort-uniq-count-rank command will output:

12      Iverson GL
12      Zuckerman SL
11      Guskiewicz KM
11      Kerr ZY
11      Solomon GS
10      Covassin T
10      Stern RA
9       Arnett PA
9       Baugh CM
9       Kroshus E
9       Mihalik JP