Mac Command Line Utilities (CLUtils)

by Ron Charlton

Release 2.1 (2026-10-25)

All utilities are standalone, universal2 executables and will run on both Apple silicon Macs (arm64) and Intel Macs (amd64) with macOS 11.x and later.

After installation this page will be found at /usr/local/share/CLUtils/CLUtils.html, and help for the utilities will be found at /usr/local/share/CLUtils/CLUtilsDoc.html. CLUtilsDoc.html's content for each utility can seen directly by typing <command> -h in a terminal window, e.g., cnl -h.

Each utility was written in the C programming language or the Go programming language. They will be installed in /usr/local/bin. To remove all CLUtils utility files type CLUtilsUninstall in a terminal window.

CHANGES

COMMAND DESCRIPTIONS

  1. A1c — Hemoglobin A1c to blood glucose mg/dl and mmol/mol converter.
  2. bitCounter — Count the zero bits and one bits in a file or standard input.
  3. charFreq — Count the various characters in the input, and output a list of character frequencies sorted by descending frequency of occurrence.
  4. cnl (Convert NewLines) — Provide universal conversion of line endings in text files or standard input.
  5. crs (Carriage Return Status) — Report CRs, LFs, CRLFs and LFCRs in file(s).
  6. CutMiddleBytes — Cut the middle from the input and send the ends to the output. Also will send just the middle to the output if requested.
  7. detab — Replace tab characters with runs of space characters.
  8. entab — Replace runs of space characters with tab characters.
  9. eq — Convert among several numeric bases and ASCII.
  10. escape_html — Change & < > " to character entities (&amp; etc).
  11. EvolvoType — Evolve a phrase by keeping random, correct characters. This demonstrates how evolution works quickly by retaining good qualities.
  12. file2Carray — Read binary data from a file (or redirected stdin) and write an equivalent C char array to a file (or stdout).
  13. genfile — Generate a file of specified size filled either with 'A' characters or with high-quality pseudorandom bytes generated with AES in CTR mode, or a repeated phrase. The phrase can include escaped characters.
  14. jumblist — Unscramble jumbled letters to make a word.
  15. lcase — Filter to set all letters to lower [upper|swap] case.
  16. letterFreq — Count the letters in the input and show a sorted list of letter frequencies.
  17. locc — Count lines of C, C++ or Go source code in file(s) or standard input. locc ignores comment-only lines and blank lines to give an accurate count of source code lines.
  18. middle — Extract lines from the middle of a text file.
  19. PhoneWords — Find words to replace the digits in a phone number with the letters on a phone's keypad.
  20. remcomments — Remove comments from C, C++ and Go source code.
  21. retab — Change tab character widths in a text file(s) without changing its appearance.
  22. reverseFile — Reverse the line order from text input and write the lines to the output.
  23. rontime — Time a command to microsecond accuracy, up to about 28 years.
  24. sha3sum — Show SHA-3 digests for files named on the command line. Digests of 224, 256, 384 and 512 bits are supported.
  25. shake256 — Provide a 512-bit SHAKE256 hash for file(s) or standard input.
  26. shuffleBytes — Shuffle the order of bytes in a file to a new file or in-place.
  27. sleepSeconds — Sleep (pause) for a number of seconds. sleepSeconds' range is 1 microsecond to 2,147,483,647.999 seconds (about 68 years).
  28. text2Cstring — Read text from a file or stdin, and write an equivalent C string to an output file or standard output. text2Cstring relies on the C compiler concatenating C string literals separated by only whitespace.
  29. timeleft — Show your life expectancy and probability of dying within one year, updated every second. Based on USA Social Security Adminstration data.
  30. unescape_html — Restore & < > " from character entities in HTML code.
  31. unfold — Unfold blocks of text, separated by blank lines, into single lines.
  32. wildspeller — wildspeller is a spelling aid that matches spelling guesses with *? wildcards or a best guess without wildcards. For example, 'wildspeller knewmoanya' will find 'pneumonia', as will 'wildspeller pneumon*'.
  33. wrapText — Break long lines at a space.
  34. Xdebt — Show the total US public debt each second and the per capita debt. The amount shown is based on the 2025-12-31 figures for all debt, population, and the rates of change for each.

COMMAND USE

Use command -h to get detailed help for a command, e.g., cnl -h.

Use man clutils in a terminal window to see this file as a manual page.

UNINSTALL

Type CLUtilsUninstall in a terminal window to remove all CLUtils utilities files from your computer.

LICENSES

Go language programs eq, shake256, crs, entab, sha3sum, cnl, lcase, retab, PhoneWords, jumblist, timeleft, shuffleBytes and wildspeller by Ron Charlton are public domain, and may be freely distributed. Public domain is per CC0 1.0; see https://creativecommons.org/publicdomain/zero/1.0/ for information.

locc, remcomments: copyright © Ron Charlton 2019, copyright © Michael Burr 2012; may be freely distributed, see the license at https://creativecommons.org/licenses/by-sa/4.0/.

crs, jumblist and locc call go-locale software that is copyright © 2020 Alexis Jeandeau under the MIT license.

bitCounter contains code from falstaff@xs4all.nl (Falstaff), 1995-10-16.

The C programs by Ron Charlton are public domain, and may be freely distributed. Public domain is per CC0 1.0; see https://creativecommons.org/publicdomain/zero/1.0/ for information. The C programs are A1c; bitCounter; charFreq; CutMiddleBytes; detab; escape_html; EvolvoType; file2Carray; genfile; letterFreq; middle; reverseFile; rontime; sleepSeconds; text2Cstring; unescape_html; unfold; wraptext and Xdebt.

UPDATES

https://RonCharlton.org/

CONTACT

E-mail: Ron Charlton <Ron @ RonCharlton.org>
E-mail: Ron Charlton <charltoncr @ wowway.com>

Page Last Modified: 2026-10-25