I’ve been struggling with a rather complex shell script, and it’s becoming apparent that Bash might not be the best choice for this particular task. While I usually gravitate towards statically typed languages like Go or Rust, I’ve noticed that many people recommend alternative languages such as Lua or Python for scripting tasks.

I’m curious to know your opinions and experiences with scripting languages for larger or more intricate shell scripts. Have you ever encountered a situation where Bash just didn’t cut it, and if so, which scripting languages did you turn to for a more effective solution? Are there any specific languages you found particularly suitable for debugging, testing, or handling complex logic in your shell scripts?

  • AggressivelyPassive@feddit.de
    link
    fedilink
    arrow-up
    2
    ·
    10 months 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
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      10 months 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. see here