Live data from Hacker News

Bash-lib: Library for bash utility methods and tools

github.com

21–25 of 25 posts

Re: Bash-lib: Library for bash utility methods and tools

#21
post #19
post #17

Shameless plug but I was not a huge fan of working with bash as I liked python, so I made Sultan: https://sultan.readthedocs.io/en/latest/

any reason for this vs. plumbum?

Sultan seems less like bash and more like a Python to me. Not having to pass everything as a list of tokens feels nicer.

Re: Bash-lib: Library for bash utility methods and tools

#23
post #2

We need a Bash package manager and global repo now! (If you had told me in 2001 that Javascript would have had NPM and bash not, I would not have believed you.)

> bpkg is a lightweight bash package manager. It takes care of fetching the shell scripts, installing them appropriately, setting the execution permission and more. > You can install shell scripts globally (on /usr/local/bin) or use them on a per-project basis (on ./deps/), as a lazy-man "copy and paste". https://github.com/bpkg/bpkg --- Also bash-lib is using bats (Bash Automated Testing System) for verification, wh…

>has been forked should anybody be interested https://github.com/bats-core/bats-core

Is this the maintained fork you've linked to?

Re: Bash-lib: Library for bash utility methods and tools

#24
post #9
post #8

Earlier quoted context omitted.

This seems very interesting, however also dangerous. I mean, this seems to make Bash a modern programming language, however if you do need something like this a modern scripting language like Python would be better in those cases.

Why is that dangerous? I mean I have seen tons of things in python where I'd say "Why didn't you just do this in bash. Neither python nor bash exclude the other. Some things are easily solved in one, others are more easily solved in the other. And both have "escape hatches" to the other.

I mean, there is some things that Bash really shines, specially for gluing code or working with pipelines.

However, not rarely this ends in a trap: "oh, I already have this small shell script here, I will just add another feature". After sometime, you get a gigantic shell script full of lines that nobody understand anymore, since Bash lacks so many things as a programming language that you end up with multiple hacks just to support that feature you wanted.

I went with the trap above more than once, and sometimes I get myself in it again, until I decide that enough is enough and just rewrite the script in something else.

Post reply on HN