ReadMe file for Command Line Utilities by Ron Charlton, release 31
2021-01-16
History
Release 31 (2021-01-16): New program crs shows whether files
contain carriage returns (CR), line feeds (LF), CRLF and/or LFCR.
Some other utilities have bug fixes and minor improvements.
Release 30: filedate now correctly displays access and modify
times; they were swapped before.
cnl allows using option -p/-preserve-dates without using
option -i/--in-place.
Release 29: charFreq now sorts its output by descending character
frequency.
Some other utilities have bug fixes and minor improvements.
Release 28: Which doesn't crash with "which \echo".
Xdebt has updated US total public debt and population figures.
Some other utilities have minor bug fixes.
Release 27: Entab and detab now allow processing
multiple files into
a directory of your specification, as well as processing files in-place.
Hexdump will now use environment variable PAGER to display its
results if it is set.
Release 26: convertNewlines is replaced with cnl. cnl works like
convertNewlines but also will process matching files in sub-directories if
requested.
Programs wc, locc and sha3sum have their
-r/--recursive options changed to -s/--subdirs because the word
recursive describes a programming technique instead of what the
option does. I'm sorry for any confusion this change may cause.
Some other utilities have bug fixes and minor improvements.
Release 25: Added uniq utility to remove duplicate lines from
input.
Release 24: sha3sum now has option -r to recursively visit
sub-directories.
Release 23: locc now processes very old Macintosh files (with CR
line endings) correctly.
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 and C++ 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 sub-directory xargs_source.
How To Use These Programs
The two sub-directories — Win32 (for 32-bit Windows) and
x64 (for
64-bit Windows) — contain 38 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.
Program xargs
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
GNUCOPYING.txt
in this directory for the GNU GPL, and
COPYING.LIB.txt for regcomp(), regexec() and
regerror() licenses.
Programs In The Win32 And x64 Directories
A1c — Hemoglobin A1c to blood glucose mg/dl and
mmol/mol converter.
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] case.
charFreq — Count the various characters in the
input, and output a list of character frequencies sorted by descending
frequency of occurrence.
cnl — (was convertNewlines) Universal conversion
of end-of-lines among Windows (CRLF), Linux (LF) and old Mac (CR) formats.
See also Ron Charlton's graphical user interface (GUI) program
EOL.
crs — show whether files or standard input
contain CRs, LFs, CRLFs and/or LFCRs. crs has a -s/--subdirs option to
process matching files in subdirectories.
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.
emptyBlankLines — Convert lines containing
only blanks to empty lines in files. Recommmendation: use this command
— C:\>mklink ebl.exe emptyBlankLines.exe
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).
filedate — Show the create, access and
modify 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 ASCII.
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
-s/--subdirs 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 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.
unescape_html — Restore & < > "
from character entities in HTML code.
uniq — Remove duplicate (or at your option,
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
output.
wc — Line/word/character counts in files or
standard input. Provide counts for files in subdirectories if so
requested.
which — Find the path(s) to the executable file(s)
for a command.
wraptext — Break long lines at a space.
xargs — Execute a command with arguments taken
from 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 2020-08-06 figures
for debt, population, and the rates of change for both.
Please report any program misbehavior to the following email
address. Please include any output from the misbehaving program when the
misbehavior occurred.