FREQ(1plan9)

πŸ’– NAME πŸ’–

okay bestie, welcome to FREQ(1plan9) β€” the manual for freq, which prints a histogram of character frequencies. That's it. That's the whole gig. πŸ’…

✨ SYNOPSIS ✨

freq [ -dxocr ] [ file ...  ]

🌸 DESCRIPTION 🌸

freq reads the files you hand it β€” and if you hand it none, it reads standard input by default β€” then prints histograms of the character frequencies. Very data-girlie of it. πŸ‘‘

By default, freq counts each byte as a character. But under the -r option, it instead counts UTF sequences, that is, runes. Runes! Fantasy novel energy, fr fr. 🧚

Each non-zero entry of the table is printed with the byte value in front of it, in decimal, octal, hex, and Unicode character (if it's printable). So every value gets its full main-character moment. ✨

If any options are given, the -d, -x, -o, and -c flags specify a subset of value formats: decimal, hex, octal, and character, respectively. Here's the rundown:

  • -r β€” count UTF sequences, that is, runes, instead of bytes.
  • -d β€” decimal format, bestie.
  • -x β€” hex format.
  • -o β€” octal format.
  • -c β€” character format.
no cap, the default is bytes unless you say -r. periodt.

πŸ“ SOURCE πŸ“

/src/cmd/freq.c

πŸ‘€ SEE ALSO πŸ‘€


bye bestie, this was the FREQ(1plan9) page, source at /src/cmd/freq.c, mwah πŸ’…πŸ’–

πŸ“¦ where this page comes from