11

Man, making scripts for random shitty tasks is so god damn nice. Like pushing a new version in a repo. Throw together a script to find metadata and kubernetes files and identifies and update versions automatically, then commit, tag and push. Simple script, not even 100 lines of bash, but saves so many silly mistakes.

Comments
  • 2
    bash is love. the learning curve is steep but thats because its so powerful.

    the other day i was chatting with someone on devrant, and slapped toegether a crawler to prove a point.
    ~25 lines, 20mins to make.

    and i wouldnt consider im "fluent" in bash
  • 1
    python > bash
  • 0
    @atheist really dont know about that.

    bash is "string-based" as opposed to "symbol based" (for lack of better term).

    i mean the script itself can change throughout the execution.

    iirc with python you would have to write another file and launch it
  • 0
    python you can execute strings. Not sure why you'd want to tho
  • 0
    @atheist you can write auto-generating scripts.

    well you can do exactly the same with python, but in shell/bash its a core idea so its much more convenient

    i mean $component1$component2 is more convenient for me than

    string_1 = string_1 + string_2
    os.system(string_1)
  • 5
    @atheist I like assuming that people only have the bare minimum installed. A shell (not necessarily bash) is always present. Python isn't necessarily
  • 2
    @atheist Python is certainly better in some cases but @ScriptCoded pointed out; you have fewer risks in using Bash (maybe except Windows) when creating and sharing/deploying scripts.
  • 0
    @atheist I wonder what you you think is better, a hammer or a driller.
  • 0
    @bad-frog OK. What can you do with that that can't be done with function calls?
  • 0
    @ScriptCoded So, why not depend on whatever the tuntime of your environment is, be that js, py, whatever?
  • 0
    @Berkmann18 you just repeated what someone else had said. your comment adds nothing, and you're wrong for the very reason you point out.
  • 0
    @mundo03 I don't give a shit, I use the best tool for the job. You're just being an asshole.
  • 0
    @bad-frog I mean, the notation you've used looks like a function call, and creating small pieces of code that can be run in an arbitrary order is the very definition of what a function is for.
  • 1
    @atheist "best tool for the job", see? It wasn't that hard.
    Languages like bash and python are tools, and you, as you said, choose the best one for the job.

    So to correct your initial comment: python != bash

    Now we seem to agree on that.
    About being an asshole, sure, but Ingot you to correct your stupid beliefs. Have fun with your new life.
  • 0
    @atheist Oh yeah, so you're claiming every OS come with Python preinstalled?
    And those in the Linux/Unix family don't have Bash/shell preinstalled?

    And imagine claiming "Python > Bash for everything" and saying you use the best tool for the job.

    You're ridiculous 🤣!
  • 0
    @atheist Using something that pre-installed pretty much makes it reusable and simple to use. Sure, I might use the language of the code base if it's a more complicated task, but as you said yourself - the right tool for the job. In this case I'm pretty much just running commands, and that's exactly what shell script's for. Now, take it easy and find another forum to go berserk on. devRant isn't the place for that.
Add Comment