ReadMe file for Command Line Utilities by Ron Charlton, release 25
Release 25: Added uniq utility to remove duplicate lines from an input.
Release 24: sha3sum now has option -r to recursively visit subdirectories.
Release 23: locc now processes very old Macintosh files (with CR line
Release 22: wc now has a -r option to recurse into subdirectories. It also
defaults to adding thousands separators in the counts (they may be turned off
with option -n).
Release 21: locc now has a -r option to recurse into subdirectories. It also
adds thousands separators in the counts (they may be turned off with option -n).
locc will count lines of Go source code as well as C source code.
Release 20: Added locc to show a count of non-comment, non-whitespace lines of
C source code.
Release 19: Added genfile to generate a file of specified size, with a repeated
phrase, 'A' characters, or cryptographically generated pseudorandom bytes.
Release 18: Added PhoneWord to make words from a telephone number (x64 only).
Release 17: Rename HashTimeAndClock as HashTime to better reflect what it does.
Release 16: Build bitCounter correctly for Win32/x86 machines.
Release 15: Changed my email address in -v/--version info in all programs.
Release 14: Fixed detab: It mishandled tab characters in some cases.
Release 13: Fixed a hexdump newline error when writing to an output file.
Release 12: Added program Xdebt.
Release 11: Several programs were crashing due to a programming error in
one source file.
Release 10, xargs will terminate its child process when it (xargs) is
signalled to close (e.g., Ctrl+C). Source code for xargs is included in
How To Use These Programs
The two sub-directories — Win32 (for 32-bit Windows) and x64 (for 64-bit
Windows) — contain 37 identical programs, all described below. These
are native Win32 and x64 Windows programs and require no support files to
run. Directory x64 contains one additional program (PhoneWord).
To install these programs: Copy the files from the appropriate Win32 or x64
directory to a directory that is in your computer's executable search path
(see "echo %PATH%" [with no quotes]).
These programs accept "-h" or "--help" as requests for
help on how to use
them. For example, type "commconv -h" at the command prompt.
is documented in xargs.html in this directory, as
well as with "-h/--help".
See COPYING.txt in this directory for program licenses. Also see COPYING
in this directory for the GNU GPL, and COPYING.LIB for regcomp(), regexec()
and regerror() licenses.
Programs In The Win32 And x64 Directories
A1c — Hemoglobin A1c to blood glucose mg/dl and mmol/mol
beep — Beep at a specified frequency through the default
sound device (usually a sound card).
bitCounter — Count the zero bits and one bits in a file
and/or redirected standard input.
case — Filter to set all letters to lower [upper|swap]
charFreq — Count the various characters in the input and
output a list of character frequencies.
convertNewlines — Universal conversion of
end-of-lines between Windows, Linux and old Mac formats. Recommendation:
"copy convertNewlines.exe cnl.exe" for
brevity. Or use "mklink cnl.exe convertNewlines.exe" (no quotes).
See also Ron Charlton's GUI program EOL.
copyFile — Copy a file to another name.
CutMiddleBytes — Cut the middle from the input and send
the ends to the output. Also will send just the middle to the output if
detab — Replace tab characters with runs of space
emptyBlankLines — Convert lines containing only blanks
to empty lines in
file(s). Recommendation: "copy emptyBlankLines.exe ebl.exe" for
brevity. Or use "mklink ebl.exe emptyBlankLines.exe" (no quotes).
entab — Replace runs of space characters with tab
eq — Convert among several numeric bases and
escape_html — Change & < > " to character
EvolvoType — Evolve a phrase by keeping random, correct
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).
filedate — Show the create, access and modification
dates and times of files
to millisecond precision (not necessarily accuracy).
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.
hashTime — Write 64-bit, unsigned, pseudorandom numbers
from hashing the system Performance Counter and UTC system time.
hexdump — Show input (file or stdin) in hexadecimal and
HexToRawBytes — Read ASCII hexadecimal digits from the
input and write raw binary to the output.
letterFreq — Count the letters in the input and show
a sorted list of letter frequencies.
locc — Lines Of C Code: Count the lines of C, C++
or Go source code in files or standard input.
locc ignores comments and whitespace-only lines to give an
accurate count for lines of non-comment C, C++ or Go source code. locc has
-r/--recursive options that will provide counts for files in subdirectories.
It now adds thousands separators to line counts; this behavior can be turned
off with option -n/--no-separator. See "locc -h" for help.
middle — Extract lines from the middle of a text file.
PhoneWord — (available for x64 only) Generate English
words from a telephone number of 2 to 10 digits.
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.
sleepSeconds — Sleep (pause) for a number of seconds.
sleepSeconds' range is 1 microsecond to 2,147,483,647.999 seconds (about
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.
unescape_html — Restore & < > " from
character entities in HTML code.
uniq — Remove duplicate (or optionally, unique)
lines from a sorted file or sorted standard input.
unfold — Unfold blocks of text, separated by blank
lines, into single lines.
unsort — Shuffle the input lines and write to the
wc — Line/word/character counts in files or
standard input. Provide counts for files in subdirectories if so
which — Find the path(s) to the executable file(s) for
wraptext — Break long lines at a space.
xargs — Execute a command with arguments taken from the
standard input. See xargs.html for details.
Xdebt — Show the total US public debt each second and
the per capita debt.
The amount shown is based on the 2018-03-18 figures for debt, population, and
the rates of change for both.
Please report any program misbehavior to me at the following email
address. Please include any output from the misbehaving program when the