Python and / or Perl VS bash

I usually code admin scripts in Python, and I know many who code them in Perl. I was going to spend some time improving my bash programming skills. But I wonder if people think this is a good idea?

I know bash is a good skill, and it is often required in the market, but ... if I can get around Python or Perl, then ... is it really worth the effort?

As an answer, I'm looking for cases where bash is actually better than Perl or Python for developing admin scripts.

+7
source share
2 answers

Everything that you learn can benefit you, but it is not a bad idea to learn something. However, if you feel that you are productive with Python, then I don’t understand why you need bash. Python is more powerful (being a full-blown programming language), and IMO has a more convenient and understandable syntax. Bash is often useful for fast and dirty scripting.

If you decide to learn it, here are some resources to help you get started:

Although some thumb rules sometimes arise in the air as to when you should use them, I think you will understand this as soon as you know all your options. Having another tool in your arsenal is always an advantage.

+7
source

I would say that if this is only your machine, and you should not share these administration scripts with anyone else, so you better keep doing this in Python (which seems more convenient to you).

But if you have colleagues, or your admin scripts should be collaborators of other people, so let it be more popular and more understandable to others: Bash!

Also, I think that if you know Bash, you can simply use dozens of existing Bash scripts by tweaking them or upgrading them to whatever suits you best.

0
source

All Articles