Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Shell libraries to help writting shell script
branch: master
Failed to load latest commit information.
tests Update CLI testcases towars cli and cli-help changes
COPYING initial commit
INSTALL - script ScriptHelper.conf file, which has to be put in /etc/ if you …
ScriptHelper.conf add SCRIPT_HELPER_VERSION variable in configuration file - bugfix CLI_RUN() : better check of existance of added command (quit… bugfix CONF_LOAD called with empty string - fix issue #3 : replace all 'echo' by 'printf' bugfix BR(), as we are using printf now use 'ps -p' instead of 'ps -A | grep' - fix issue #3 : replace all 'echo' by 'printf'


== Welcome to ScriptHelper

ScriptHelper is a POSIX shell library of common functions, to facilitate code reuse.

First, I've wrote ScriptHelper to be able to send bash script to other users and
always know what's wrong when they failed. This was the purpose of the CMD command,
which role is to exec a command, log stdout & stderr, and check the return status.

Then, I've added some functions, I wrote several times.

== Description of contents

* : library files
tests/* : test files

Each file have description of their functions, usage, options, etc..

== List of libraries

I try to make one lib for each purpose :
 - : messaging functions.
 -    : execute commands, check the return code, Rollback feature
 -     : usefull when you have to ask question to the user
 -     : create easily Command Line Interface for interactive scripts
 -    : deal with configuration file (where data are stored with key=value format)
 -    : take a resource by locking it
 -    : to prepare and send mails
 -   : mutex for allocating resource
 -   : to make mysql scripts
 -  : random number generator
 -  : record tty session

== Install

read INSTALL file

== Usage

ScriptHelper is used in those projects :
 - Tosca ( - deployment scripts
 - sshGate ( - ssh proxy in bash
 - ScriptCollection ( - little script to make specify tasks
Something went wrong with that request. Please try again.