Skip to content

A collection of commonly used Bash functions to make your scripts cleaner and more efficient

Notifications You must be signed in to change notification settings

the-common/bash-functions

Repository files navigation

The common Bash functions

A collection of commonly used Bash functions to make your scripts cleaner and more efficient.

https://gitlab.com/the-common/bash-functions
The GitLab CI pipeline status badge of the project's main branch GitHub Actions workflow status badge pre-commit enabled badge REUSE Specification compliance badge

#bash #functions #library #bash-library

How to use

Refer to the following instructions on how to make use of this product:

  1. Download the release package from the Releases page.

  2. Extract the package.

  3. Include the functions.sh file in your project directory.

  4. Source the functions.sh file in your Bash scripts where you want to use the functions. For example:

    #!/usr/bin/env bash
    
    if ! source /path/to/functions.sh; then
        printf 'Error: Failed to load the common functions.\n' >&2
        exit 1
    fi

Licensing

Unless otherwise noted(comment headers/REUSE.toml), this product is licensed under the 4.0 International version of the Creative Commons Attribution-ShareAlike license, or any of its more recent versions of your preference.

As an exception of the previous clause, this product can be licensed otherwise under the 2.0 version of the Apache license if it is used to instantiate/refactor a functions file based on it rather than using it in the making of another template project. This allows relicensing the project assets to your liking in your non-template projects with only a conformance requirement of attributing this product somewhere in your project/product credits/acknowledgment/copyright notice documentation/user interface.

This work complies to the REUSE Specification, refer to the REUSE - Make licensing easy for everyone website for info regarding the licensing of this product.

About

A collection of commonly used Bash functions to make your scripts cleaner and more efficient

Topics

Resources

Stars

Watchers

Forks

Languages