Skip to content

Modular Bash function library for reusable scripting components, including logging, validation, file and network tools.

License

Notifications You must be signed in to change notification settings

Turukmoorea/bashmod_lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

bashmod_lib

Reusable Bash functions and modules for script developers of all genders. This library allows you to develop, share, and reuse modular Bash components in your own scripts.

Usage

You can source individual modules in your own script:

# Example: Sourcing the string and log modules
source /path/to/bashmod_lib/modules/string.sh
source /path/to/bashmod_lib/modules/log.sh

log_info "Starting script..."
result=$(string_trim "   Text with spaces   ")
echo "$result"

Alternatively, you can load a module directly from GitHub without cloning:

source <(curl -s https://raw.githubusercontent.com/youruser/bashmod_lib/refs/heads/master/modules/log.sh)

Installation

Clone the repository (e.g. as a submodule or via curl/wget):

git clone https://github.com/youruser/bashmod_lib.git

Or add it to an existing project:

git submodule add https://github.com/youruser/bashmod_lib.git libs/bashmod_lib

Compatibility

  • Bash ≥ 4.0
  • POSIX-like shells (partially supported)

Contributions

Pull requests, issues, and discussions are welcome. Please stick to simple, POSIX-compatible Bash syntax and structure new modules like the existing ones.

About

Modular Bash function library for reusable scripting components, including logging, validation, file and network tools.

Topics

Resources

License

Stars

Watchers

Forks

Languages