Skip to content

sh (/bin/sh) utility libraries: dict : associative key:value collection functions parseargs : command line argument parsing inspired and modelled after Python argparse sh_test : basic unit test support

License

Notifications You must be signed in to change notification settings

ralph-mcardell/sh-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sh-Utils: Shell Utilities for /bin/sh

This repository contains Linux (and similar) shell script utility libraries. They rely on basic shell facilities and a few core utility programs. Specifically:

  • POSIX (IEEE Std 1003.1-2008) Shell Command Langauge Specification as detailed at the Open Group Shell Command Langauge Specification page
  • the local utility
  • the tr utility
  • the sed utility
  • the echo utility with non standard -n option
  • the getopt utility (parseargs.sh only)
  • the ARG_MAX configuration variable if getconf installed (parseargs.sh only)

The repository has the following structure:

  • bin directory contains executable scripts - currently library unit tests.
  • lib utility 'library' modules that should be included using the source ( . ) syntax into scripts that wish to use them (note: the source command is not part of the POSIX shell command language, use . instead: . 'path/to/library/module').
  • doc documentation for the library modules.

The library modules are:

  • dict.sh - a collection of functions that allow working with an associative container abstraction.
  • parseargs.sh - a collection of functions that use dict.sh to support an argument parser with functionality similar to the Python ArgsParse package.
  • sh_test.sh - a simple unit test framework - created to support unit testing the other libraries.

See the documents in the doc directory for further information.


Copyright (c) 2022 Ralph. E. McArdell

About

sh (/bin/sh) utility libraries: dict : associative key:value collection functions parseargs : command line argument parsing inspired and modelled after Python argparse sh_test : basic unit test support

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages