SORT-UNIQ-COUNT(1)
π SORT-UNIQ-COUNT(1) π
okay bestie, so this is from the NCBI Entrez Direct User's Manual, and honestly? it's giving "tiny script, huge main character energy." two lil programs, one job: tell you how many times each line shows up. periodt.
β¨ NAME β¨
sort-uniq-count, sort-uniq-count-rank β print line frequencies π
like. that's it. that's the whole vibe. they count lines. slay.
β¨ SYNOPSIS β¨
sort-uniq-count[-rank] [[-]b] [[-]f] [[-]i] [[-]n] [[-]r] [[-]s]
okay so notice the little tea β: the flags can be written with or without a leading dash. -f and f are the same thing here. no cap. the brackets around the dash in the synopsis are literally saying "dash optional, bestie."
β¨ DESCRIPTION β¨
so here's the deal. sort-uniq-count and sort-uniq-count-rank each read a text file on standard input, sort it according to whatever flags you gave them (-f is the default, iykyk), and then report to standard output how often each input line occurs. πΈ
every single output line is built like this: a count, then a tab, then an input line. so it's count<TAB>line. that's the shape. that's the format. don't fight it. π
sort-uniq-countgives you the output in your choice of sort order. you're the main character, you pick.sort-uniq-count-rankis the overachiever π: it sorts primarily from highest to lowest count, and then uses your sort order as the tiebreaker. so the most frequent lines float right to the top where they belong.
β¨ OPTIONS β¨
one bullet per flag, no skips, we're thorough here π
[-]bβ ignore leading blanks. those lil spaces at the start? not important, bestie. π[-]fβ ignore capitalization.HELLOandhello? same girl. same. (this one is the default btw β¨)[-]iβ consider only printable characters. the unprintable ones get the silent treatment π[-]nβ compare according to numerical value. numbers get compared as numbers, not as lil alphabet soup. π₯[-]rβ reverse the result of comparisons. flip it. turn it upside down. π¦[-]sβ stabilize sort. keep the order stable, queen. β
β¨ SEE ALSO β¨
go give these their flowers too, fr fr:
and that's the whole page, bestie!! this was brought to you by NCBI, dated 2025-05-26 β so if you're reading this way later, just know it was iconic when it dropped π«Άπβ¨
π¦ where this page comes from
- debian trixie: ncbi-entrez-direct 24.0.20250523+dfsg-1+b1 Β· PD
- ubuntu questing: ncbi-entrez-direct 24.0.20250523+dfsg-1
- ubuntu resolute: ncbi-entrez-direct 24.0.20250523+dfsg-2 Β· PD
- ubuntu stonking: ncbi-entrez-direct 24.0.20250523+dfsg-2 Β· PD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms