The eggsh project was originally written in 2005:

  • to make it easier to reuse bash code
    • Frequently, Bash code was written and served just one purpose and had a hard time evolving. The problems included the flat namespace of bash variables and functions.  And, not just these, but even filenames tended to be named poorly, making it difficult to reuse them.
  • to help separate data from logic
    • Often, code was written with one deployment target in mind. The ability to run code that worked in one environment and then reuse it in another environment usually involved modifying Bash scripts with conditions that progressively made the scripts harder to read and maintain.

Since those early days, eggsh has grown to solve some other problems:

  • to introduce object-oriented programming to bash
    • Now, this was a tough one.  The problem was to introduce just enough object-oriented ideas to make Bash scripts more powerful, but without making the use of this mandatory, all while at the same time keeping this easy.
  • to use JSON to model data
    • Bash does not segregate its variables by "type." Essentially, Bash variables are character strings. But, depending on context, Bash permits arithmetic operations and comparisons of variables. []
    • The eggsh adds JSON support to make it easier to model complex objects, reducing the need to use multiple variables to represent tohose more complex objects.

As of July 1, 2016, eggsh is evolving to an OpenSource project!

Please take a look at how eggsh can make your Bash coding better!