Pedro Piñera
Blog
About
Open Source
Wiki

Learning bash

7 March 2020

If there's something I regret not having learned well in my early days as a developer, that's bash. I know the concepts that one needs to go to get by, but sometimes I need to get closer to the system to understand some scripts or things around permissions and then I'm lost. Stackoverflow is my go to place most of the times when I find myself in these situations, but I end up doing something that I'm not comfortable doing as a developer: copying and pasting without understanding what I'm doing.

Moreover, I have to resort many times to scripting languages like Ruby for tasks that would be straightforward right from the shell with utilities like grep or sed. From a high-level programming language you only need to know that you can execute commands, that they send the output through pipeline, and that they return a code to indicate if it ran successfully. You barely need anything else.

As I continue down the path of building tools for developers, I think it's crucial to have a good understanding of the environment the tools interact with. For that reason, I started reading a book about shell scripting and bash. My goal is to be able to parse a bash script and understand the logic in them. I also would like to have a better understanding of the core concepts of UNIX and the possibilities that it offers. It exciting!

Copyright © Pedro Piñera, 2019