News for hackers. Stuff that matters.
Re:Safe ways to do things in bash by davedx on Tuesday May 15, 2018 @04:14AM (#17072412)
Yes, but which one, and which version? This is especially painful with Python ;)
Re:Safe ways to do things in bash by vinceguidry on Tuesday May 15, 2018 @09:34AM (#17073773)
Use Ruby. It doesn't change much from version to version, thank God. I curse python every time I have to install a package. Nothing Just Works.

If you install just one gem, bundler, you can get dependency management in a one-file script. Checkout Bundler Inline:

https://github.com/bundler/bundler/blob/master/lib/bundler/i...

Re:Safe ways to do things in bash by h1d on Tuesday May 15, 2018 @04:28AM (#17072482)
What's painful about Python but not so for others? Writing anything complicated in bash/zsh is painful enough I wouldn't even think about it.
Re:Safe ways to do things in bash by Groxx on Tuesday May 15, 2018 @04:37PM (#17077659)
2 vs 3 is not a small change. and tools for helping you do things (like a 3+2 compatibility lib) get installed with pip... which is horrifyingly fragile. `pip install your-lib` -> you have no idea if you have the dependencies you require, because pip doesn't behave rationally. it often Just Works™, but when it doesn't there's no help and a massive minefield of potential problems.
Re:Safe ways to do things in bash by CJefferson on Tuesday May 15, 2018 @07:46AM (#17073243)
I currently find some users have python2, some have python3, some both. It's fine in a controlled environment, or if your users are Devs, but a pain with normal users who I just want to send a script to.
Re:Safe ways to do things in bash by mncolinlee on Tuesday May 15, 2018 @12:32PM (#17075203)
KotlinScript is yet another option that handles that worry nicely.

https://github.com/holgerbrandl/kscript