A general-purpose Bash function library.
See the script template and test template to get an idea of how it's used.
- Add this repository as a submodule to your main project.
- In your project scripts,
sourcethe filebash-tools.sh.
You there, developer ๐ซต
You know Python, Node, C#, Go, webdev, and then some. You're a bonafide professional: a digital dancer, a bit surgeon. You don't need to ace shell scripting, much less ride that old horse, Bash. You don't need some clumsy vestige of the 1970's that doesn't even have real data structures, doesn't have multithreading, that can't lift a finger without launching an entire process. Maybe a one-liner here or there, just to bootstrap your real program.
Yet here you are, again. Why? Because the shell is the cockpit of the PC, and Bash is its instrument panel. And make no mistake: Bash is the shell programming language. Sorry to break it to you, fishies.
Every developer, gamer, skiddie, and office jerk knows the lure of the shell. But shell programming is arcane, painful, ugly. You dove in head-first that one time, but you cracked your skull open on the bottom of the pool and you died a little.
Same here ๐
But over the years, out of pure necessity, I collected and developed a number of useful Bash functions and dynamic programming idioms to ease the implementation of automation scripts. Recently I built several large-ish programs consisting almost purely of Bash, and made a shocking realization: I was actually enjoying it. To bottle that feeling, I factored-out the reusable bits and jammed them into this modest function library, bash-tools, which I now make public. โ
๏ธ๐ค๏ธโ๏ธ
bash-tools helps me write scripts in ways that make sense to me.
bash-tools is how I choose to shell, personally.
bash-tools will probably never be seen or used by anyone but me.
But if bash-tools helps you too, wonderful!
All that being said, I warmly welcome apt addendums, constructive critiques, soaring suggestions, and perspicacious pull-requests. I use Mint, btw. ๐
๐ Happy hacking! ๐ป ๐