Masha Reko - Apprenticeship Blog

What we have to learn to do, we learn by doing. (Aristotle)

Day 13: The (Un)Importance of Bash

So it’s day 2 of learning bash and therefore the perfect time to ask that ever-so-important question: Why am I doing this, again?

Perhaps I should note that this has nothing to do with my obvious distaste for Linux. I am a thorough person by nature, and knowing stuff just for the sake of knowing them is simply not my thing. I just need to understand why is something important/necessary/vital to know and how can I possibly use it in practice. With bash, that just wasn’t obvious to me. After all, modern scripting languages, such as Python and Ruby, have a huge variety of modules (or gems) that offer everything that bash does, and more.

With that in mind, I hurried over to Google, wanting to understand why is it so important for a Software Engineer to know bash. However, from the moment I started typing my question, Google’s suggestion mechanism had other ideas:

Google Bash

Oh, well. At least it’s popular.

Nevertheless, after reading a couple of blog posts and articles on the topic, I realized why modern scripting languages did not (and will never) completely kill bash. Even though they are extremelly powerful nowadays, that power carries with itself quite a bit of problems too (such as those with regards to portability, installation, etc.). Bash, on the other hand, is so simple and lightweight, that there is no need to worry about any of that.

Therefore, I really don’t see why so many people thought that bash was hard. Perhaps everything is hard when you are a novice at it. True, it’s syntax may be ugly, but it is so intuitive. I am positive that even those that see bash for the first time can understand quite well what’s going on in basically any script. It is quite possible that I still don’t know enough to judge (and that I will bite my tongue soon enough), but it just escapes me how bash could be harder than, say, Python.

And finally, I would never describe bash as “bad”. Of course it falls short in comparisson to Python and Ruby, when more complex operations are needed. However, when it comes to simple and routine DevOps tasks, there is simply no need for anything more complicated than bash. It is just enough to do the job.

In the end, it’s all about choosing the right tool for the work at hand.