Comment on What are the recommended scripting languages for complex shell scripts beyond bash?
Longpork_afficianado@lemmy.nz 1 year ago
Maybe it’s becuase i grew up on python and bash still seems somewhat alien to me, but any time I’m crafting something with more than three or so nested functions, I use python as a wrapper for bash. Python initiates a bash script, parses the retval, inititates the next bash script from that data, etc.
agressivelyPassive@feddit.de 1 year ago
It’s really unfortunate, that the interaction between Bash and Python is so cumbersome. I would really like a simple Bash-class to invoke simple command strings directly.
ms264556@beehaw.org 1 year ago
It’s pretty close already. I forget where I cribbed the technique from, but I embed python functions into my scripts very often…
E.g. here’s the relevant parts of a bash function from one of my hobby projects …
function rks_encrypt { RUCKUS_SRC=“$1” RUCKUS_DEST=“$2” python3 - <