Skip to content

About

A versatile library to simplify the writing of Bash scripts

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

74 Commits

Folders and files

Repository files navigation

centauri-bash-lib

A versatile modularized library to simplify the writing of Bash scripts

The library was written with excecution speed in mind. It minimizes the use of subshells and external tools.

Modern bash shells provide string handling, arrays and dictionaries. Also a large collection of bash-builtins exist. As a result scripts need to make little use of external tools like sed, grep or cat. For many little tools centauri-bash-lib will execute faster than a python script.

Features

The centauri-bash-lib was written to simplify the creation of bash scripts that run fast and show GNU-coreutils-like command line behaviour.

  • it is not a monster - happily runs even on a Raspberry Pi zero
  • not distribution dependent, also runs on android/termux
  • is self-contained, no tools except bash >= 4.1 and some GNU-coreutils are needed
  • no system-wide installation required, needs no installer tools
  • built-in documentation and a documentation system
  • built-in debug support
  • roughly 120 library functions
  • minimizing the use of external tools and sub-shells
  • the library is divided into modules
  • provides automatic module loading
  • has modules for: console, dialogs, batch, services, pipes, sort/grep, xml, CGI
  • supports some GUI dialogs via kdialog
  • supports some consoles like: konsole, gnome-terminal, xterm
  • supports systemd (and SysV) services including service file generation
  • will use extra bash built-ins: ln, mkdir, mkfifo, rmdir, unlink, sleep
  • scripts can have GNU like options and arguments
  • scripts can have a --help feature
  • scripts can provide bash commandline completion
  • scripts can be localized
  • scripts have a built-in pager function (less or more)
  • a template based script creator
  • various templates including services and CGI
  • stand-alone scripts that can be distributed as a single file

Bugs

  • CGI support not yet finished
  • webapp in an early state
  • zenity support incomplete. Try kdialog

About

A versatile library to simplify the writing of Bash scripts

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages