A collection of reusable pure POSIX sh
functions with optional external
utility calls.
- CCOUNT(): Count the times a character appears in a string
- CHAR_EVEN(): Test if the sum of a character in a string is even
- CONFIRM_CONT(): Ask for confirmation to continue
- COUNT_DDIRS(): Count hidden (.*) directories in a directory
- COUNT_DFILES(): Count hidden (.*) file objects in a directory
- COUNT_DIRS(): Count visible directories in a directory
- COUNT_DOBJ(): Count all hidden (.*) objects in a directory
- COUNT_FILES(): Count visible file objects in a directory
- COUNT_OBJ(): Count all visible objects in a directory
- ERR(): Print formatted text to stderr
- ERRF(): Print red-colored formatted text to stderr and exit
- ESC_SED(): Escape a string to be used literally as a POSIX
sed
pattern - ESC_STR(): Backslash escape character(s) in a string
- FILE_PRELOAD(): Read a file raw
- FLINE(): Get a specific line in a file
- INFO(): Print formatted text
- MAP_FLINE(): Process each line of a file with a function
- MAP_PSEG(): Process all segments of a path with a function
- MAP_VLINE(): Process all populated lines of a variable (string) with a function
- MASK_CHECK(): Check a bit, the power of 2, in a pseudo-bitmask shell variable
- MASK_SET(): Set a bit, the power of 2, in a pseudo-bitmask shell variable
- MASK_UNSET(): Unset a bit, the power of 2, in a pseudo-bitmask shell variable
- NUM_TO_CHAR(): Convert N to that amount of a character
- PATH_SPEC(): Normalize a path into an assertable path specification
- REPLCHAR(): Replace a specific character with character(s) in a string
- SQ_ARG(): Get N single-quoted argument in a single-quote-escaped string
- SQ_ARG_EXTRACT(): Extract a single-quoted argument in a single-quote-escaped string