SORT-UNIQ-COUNT(1)

πŸ“¦
version 24.0.20250523 Β· 2 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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-count gives you the output in your choice of sort order. you're the main character, you pick.
  • sort-uniq-count-rank is 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. HELLO and hello? 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