Libbash.sh
A Bash library that features common functions useful for Bash developpers.
Install / Use
/learn @pruje/Libbash.shREADME
libbash.sh
A Bash library that features common functions useful for Bash developpers.
Tired to search the web any time you don't know or remember how to do a basic action in a bash script? Just include libbash.sh to your script and use the functions!
libbash.sh features more than 60 functions to:
- test if a program is installed
- search a value in an array
- ask user to confirm an action by yes or no
- print text in colours
- create and write log files
- ask user to enter and confirm a password
- read and write into config files
- ...
libbash.sh comes also with a GUI part with 15 functions to:
- display info/warning/error messages
- display system notifications
- ask user to choose a file/directory
- ...
See documentation for more info.
libbash.sh is compatible with Linux, BSD and macOS systems and works on Windows with Cygwin.
Read our wiki for some tips and tricks and other resources.
Usage
Add libbash.sh to your script:
source "/path/to/libbash.sh" -
That's all! To use more powerful features like interactive windows, please read the documentation.
Documentation
Examples
- A simple demo of libbash.sh: examples
- A major project that uses libbash.sh: time2backup
Tests
libbash.sh comes with some unit tests powered by BATS.
To simply run tests, you can execute:
bats tests/*.bats
License
libbash.sh is licensed under the MIT License. See LICENSE.md for the full license text.
Credits
Author: Jean Prunneaux https://jean.prunneaux.com
Sources: https://github.com/pruje/libbash.sh
Help us to improve libbash.sh in submitting issues to report a bug or request new features!
Related Skills
node-connect
340.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
340.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.2kCommit, push, and open a PR
