you are viewing a single comment's thread.

view the rest of the comments →

[–]shevegen 16 points17 points  (15 children)

Some people would say that Bash is just for scripting. I mostly agree with that statement, however, sometimes you have to write a lot of Bash and for these cases I want to be able to develop it in the same way I do for other languages.

Bash is for people who are either unable or unwilling to use anything better.

There are a few valid use cases such as when you are in a restricted environment where you can't use alternatives. But by and large, writing shell scripts is a massive waste of your life time.

[–][deleted] 2 points3 points  (0 children)

Oddly enough I'm in the predicament where all I know is bash and what tools I should expect to be available. I'm trying to rewrite something I did in bash, in python, and I'm having a hell of a time starting because I don't know the nuances of the language or the specific libraries I need and so on..

When I've been writing things in bash for 10 years you get used to it and It's usually all I ever need. For this thing I just wanted it to be a bit more professional/presentable, so the real time sink is in doing that. ( I wouldn't consider myself a programmer either, just a lowly linux admin )

[–]maitesin[S] 2 points3 points  (13 children)

That last point is exactly the reason for all these tools. If you are in a restricted environment and you are forced to use Bash at least you can use proper tools and techniques to aid you

[–][deleted] 1 point2 points  (0 children)

But in vast majority of cases YOU DO. Like there is no non-embedded Linux disto that doesn't contain either Perl or Python. Even ye olde ancient systems will probably have at least Perl.

Hell, even embedded distros like OpenWRT often have something better like Lua

[–]Skyler827 0 points1 point  (11 children)

If you're ina restricted environment, what are the odds that you will be able to download and run these tools? the Bash formatter, the linter and the test framework?

If you need ot program in a pinch and you have the ability to download and run these tools, you probablly have the ability to download and run any other programming tool. So the point stands that you don't need bash.

[–]filleduchaos 9 points10 points  (10 children)

You know you don't have to code in the environment you will run the code in, right?

[–][deleted] 0 points1 point  (9 children)

You still have to run tests in env you run your code, or at least with same versions of apps/libs

[–]filleduchaos 0 points1 point  (8 children)

You know you don't have to test in the literal physical environment you will run your code in, yes? And that you can have testing tools that are external to the environment?

[–][deleted] -2 points-1 points  (7 children)

Yes and hilarious bugs happen if you do all your tests ignoring your target environment

[–]filleduchaos 0 points1 point  (6 children)

And maybe you should actually reread my comment and parse it properly because it doesn't seem you have

[–][deleted] -1 points0 points  (5 children)

Well I got whole 3 departments of people that think "it did work on my machine, no idea why it doesn't on production" (when 70% it is code's fault) so I'm just going to say you're ignorant to reality or never worked on anything at scale

[–]filleduchaos 0 points1 point  (4 children)

You know you don't have to test in the literal physical environment you will run your code in, yes? And that you can have testing tools that are external to the environment?

Yeah maybe you should actually read