Sitemap
Mochammad Alamsyah

Mochammad Alamsyah

Scripting in Bash 101

1 min readSep 11, 2018

--

As a developer, it’s absolutely critical to not build additional technical debt. Investing in yourself in creating automation will help you in the long run will make you difference in whatever you are spending time and money.

Get Mochammad Alamsyah’s stories in your inbox

Join Medium for free to get updates from this writer.

Before we go to automate everything, first we need to learn about the basic. We will be using Bash Shell for this article.

Hello World

First, the gate to all new programming language.

Variable

Bash variables do not need explicit declaration to reserve memory space. The declaration happens automatically when you assign a value to a variable.

Conditional

Conditional is bash is very simple, but you need to know some conditional operator first before using it effectively.

And here is the example

Loop

Loop allow you to do a lot of stuff, for example you can loop thru files in folder and renaming them.

Now, try it on your own machine and feel free to ask me if I do some errors or typo here

Next up, Part 2.

--

--