Offirmo / offirmo-shell-lib

A collection of useful bash reusable functions for robust and advanced shell scripts. Used to power cvm and simpli.
The Unlicense
25 stars 2 forks source link

Offirmo-shell-lib

The Offirmo Shell Lib (OSL) is a collection of useful shell functions for robust and advanced shell scripts.

Requirements : I use bash.

Available at : https://github.com/Offirmo/offirmo-shell-lib

Note : The OSL has unit tests for maximum quality.

Introduction

The user story

I found myself having to write a lot of shell scripts, for work and for home.

Over the time, I had to develop a lot of useful functions.

One day, I cleaned them up and packed them in this lib. Enjoy !

Requirements

The OSL is targeted at bash. Never tested with another shell.

Installation

Get a copy of the files and set your path to point to the OSL "bin" dir. You can check if it works by typing :

osl_help.sh

In your scripts, add this as soon as possible (ideally first instruction in your script for maximum features) :

source osl_lib_init.sh

Usage

On demand, source other OSL files as needed :

libs :

Special files :

Experimental / in progress :

Env variables : OSL will respond to a few environment variables :

That's it. You can now use the features.

The functions

For now, look inside the unit tests of the file you're interested in, or look in the file itself.

TODO