lib-bash – Bash Libraries

A set of libraries to use from within your Bash scripts.

Download as .zip Download as .tar.gz View on GitHub

lib_init.sh

A file for some initial Bash Scripting best practices. It applies the following settings:

Usage:

MY_PATH="$(realpath "${BASH_SOURCE[0]}")"
SCRIPT_DIR="$(dirname "${MY_PATH}")"
readonly MY_PATH
readonly SCRIPT_DIR
readonly LIB_BASH_DIR="${SCRIPT_DIR}/lib_bash"
source "${LIB_BASH_DIR}/lib_init.sh"

Constants