Mac Command Line Utilities (CLUtils)
by Ron Charlton
Release 1.9 (2023-) All commands are standalone
universal2 executables and will run on both Intel Macs (amd64) and Apple
silicon Macs (arm64) with macOS 10.15 and later.
The utilities were written in the C programming language or the
Go programming language. They will be installed in /usr/local/bin.
CHANGES
- Release 1.9 - wrapText has new option (-n) to wrap at the margin
instead of at whitespace.
- Release 1.8 - added wildspeller spelling aid.
- Release 1.7a - Better word list in PhoneWords and jumblist.
- Release 1.7 - added timeleft (shows your life expectancy).
- Release 1.6 - added 22 new programs; all new ones written in the
C programming language. See LICENSES below for a
list.
- Release 1.5 - fixed crs to better report line
ending occurrences.
- Release 1.4 - added jumblist to unscramble jumbled
letters into a word.
COMMAND DESCRIPTIONS
- A1c — Hemoglobin A1c to blood glucose mg/dl and
mmol/mol converter.
- bitCounter — Count the zero bits and one bits in a
file or standard input.
- lcase — Filter to set all letters to lower
[upper|swap] case.
- charFreq — Count the various characters in the
input, and output a list of character frequencies sorted by descending
frequency of occurrence.
- cnl (Convert NewLines) — Provide universal
conversion of line endings in text files or standard input.
- crs (Carriage Return Status) — Report CRs, LFs, CRLFs
and LFCRs in file(s).
- 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.
- detab — Replace tab characters with runs of space
characters.
- entab — Replace runs of space characters with tab
characters.
- eq — Convert among several numeric bases and
ASCII.
- escape_html — Change & < > " to
character entities (& etc).
- EvolvoType — Evolve a phrase by keeping random,
correct characters. This demonstrates how evolution works quickly by
retaining good qualities.
- file2Carray — Read binary data from a file (or
redirected stdin) and write an equivalent C char array to a file (or
stdout).
- 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.
- letterFreq — Count the letters in the input and
show a sorted list of letter frequencies.
- jumblist — Unscramble jumbled letters to make a
word.
- 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.
- middle — Extract lines from the middle of a text
file.
- PhoneWords — Find words to replace the digits in
a phone number with the letters on a phone's keypad.
- remcomments — Remove comments from C, C++ and Go
source code.
- retab — Change tab character widths in a text
file(s) without changing its appearance.
- reverseFile — Reverse the line order from text
input and write the lines to the output.
- RonTime — Time a command to microsecond accuracy,
up to about 28 years, while providing file wild-card globbing to that
command.
- sha3sum — Show SHA-3 digests for files named on
the command line. Digests of 224, 256, 384 and 512 bits are supported.
- shake256 — Provide a 512-bit SHAKE256 hash for
file(s) or standard input.
- shuffleBytes — Shuffle the order of bytes in a
file to a new file or in-place.
- sleepSeconds — Sleep (pause) for a number of
seconds. sleepSeconds' range is 1 microsecond to 2,147,483,647.999 seconds
(about 68 years).
- 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.
- timeleft — Show your life expectancy and
probability of dying within one year, updated every second.
- unescape_html — Restore & < > "
from character entities in HTML code.
- unfold — Unfold blocks of text, separated by blank
lines, into single lines.
- 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*'.
- wrapText — Break long lines at a space.
- Xdebt — Show the total US public debt each second
and the per capita debt. The amount shown is based on the 2022-08-25 figures
for debt, population, and the rates of change for each.
COMMAND USE
Use command -h to get detailed help for
command, e.g., cnl -h.
Use man clutils in a terminal to see this file as a manual page.
UNINSTALL
Type CLUtilsUninstall in a terminal window to remove all
CLUtils utilities from your computer.
LICENSES
Go language programs eq, shake256, crs, sha3sum, cnl, 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; lcase; charFreq;
CutMiddleBytes; detab; entab; 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: 2023-