• Dandroid@dandroid.app
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    Do you do any scripts beyond extremely simple ones?

    I do a fuck ton of scripting in both bash and python. I never want to do string manipulation in bash. As soon as string manipulation is required, I automatically choose python for a script. Also, if I need named arguments or multiple levels of arguments for subcommands. You can use sys.argv for basic args, which isn’t any harder than bash arguments, but for complex inputs, argparse is a godsend. It has a bit of a learning curve, but it can handle anything. Bash requires you to write complex arg handling manually with loops and reducing.

    • Gork@lemm.ee
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      I’m trying to bash it but the problem persists. Please help.