Overview
The Bourne Again Shell (a.k.a. Bash) Framework attempts to deliver a more robust, modular, and object-oriented[-ish] approach to shell scripting.
The motivation behind the project is to promote shell-script reuse by promoting and enforcing generality.
There are some peculiarities mostly due to the nature of shell scripting, but these are surprisingly few and easy to see past.
The Library
It was very important to make the framework simple and straight-forward, which in turn led to a framework where individual elements could be used independently of each other.
We consider Bash-Framework thus both a framework and a library.
Download
Tar Archive
Tarballs of the Bash Framework are available for download
here.
SVN
The bleeding edge version is available for download from our SVN repository at
https://svn.neuroinfo.org/lib/bash.
To checkout the source from SVN, please run the following command:
svn co https://svn.neuroinfo.org/lib/bash/trunk bash
Usage
To use the library in your scripts, you must source the include script via adding the following line to the top of any script (below #!/bin/bash):
. /path/to/Bash-Framework/bash/include
At this point, you can begin including and using tools from the library by supplying include statements like so:
include bash.io.File;
include bash.apps.Pgsql;
As is reminiscent of other languages – which was the goal – you can think of the dots ('.') as slashes ("/") starting from the directory containing the library:
/path/to/Bash-Framework/bash