https://github.com/turukmoorea/bashmod_lib
Modular Bash function library for reusable scripting components, including logging, validation, file and network tools.
https://github.com/turukmoorea/bashmod_lib
bash bash-library bash-modules bash-scripting reusable-code shell
Last synced: 23 days ago
JSON representation
Modular Bash function library for reusable scripting components, including logging, validation, file and network tools.
- Host: GitHub
- URL: https://github.com/turukmoorea/bashmod_lib
- Owner: Turukmoorea
- License: unlicense
- Created: 2025-06-13T19:05:50.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2025-07-05T07:53:01.000Z (11 months ago)
- Last Synced: 2025-07-05T08:38:24.503Z (11 months ago)
- Topics: bash, bash-library, bash-modules, bash-scripting, reusable-code, shell
- Language: Shell
- Homepage:
- Size: 92.8 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:
```bash
# 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:
```bash
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`):
```bash
git clone https://github.com/youruser/bashmod_lib.git
```
Or add it to an existing project:
```bash
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.