It supports thepiratebay, nyaa, 1337x, libgen, limetorrents and rarbg

  • rumba@lemmy.zip
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 hours ago

    have plenty of experience with Bash, hence why I was eager to question the implication that bash was less complicated than other solutions.

    You said “Scripting in bash is an indescribably painful experience.”

    That’s an opinion, and it’s certainly yours to have. In my experience, neither of those solutions to the problem you suggested are all that complicated.

    In my opinion the bash is much more difficult to understand than the python and therefore it’s more likely for bugs to creep in.

    You could say this about any language/script, it’s all about our individual experiences.

    That’s a great catch on the $?, sadly, I just handed you copypasta i glanced at them to make sure they looked decent before posting. If you swap it around it appears to run fine. You’ll also need to install / use jq to do the proper json parsing.

    imo it only comes from experience that you need to add these options

    it’s optional in the python too. You can also use the OS builtin “timeout” when calling a command to generically kill it off if it doesn’t exit in a timeframe.

    Sure, I’ve done some scary things in bash before. Some of them went to production. :) timeout tail -f > output to grab x seconds of a log for monitoring.

    IMHO, Bash is fine (and rapid) up to a point. It’s available on all flavors of Linux/Unix, with some minor attention to Posix, you can make it run efficiently on most anything (except maybe fish, had a couple of devs that REALLY swore by fish, but it wasn’t nice about syntax.)

    Bash is more available without privilege and more backward compatible. It does lack finess and utility for larger projects. At some point, you need to do things that are better managed in Python libraries.
    I would not want to attempt a proper web server CGI in bash, nor try heavy math.

    Bash is nice because you’re using OS binaries behind the scenes to do the heavy lifting. They’re all written in something optimized and beefy. It’s like you get to use all the power and stability of C projects with the duct tape speed and efficiency that surpasses most of the scripting languages. It’s a hell of a lot easier to do system calls in bash than py :)