Please stop writing shell scripts

When you’re automating some task, for example packaging your application for Docker, you’ll often find yourself writing shell scripts.
You might have a bash script to drive the packaging process, and another script as an entry point for the container.
As your packaging grows in complexity, so does your shell script.

Everything works fine.

And then, one day, your shell script does something completely wrong.

That’s when you realize your mistake: bash, and shell scripting languages in general, are mostly broken by default.
Unless you are very careful from day one, any shell script above a certain complexity level is almost guaranteed to be buggy… and retrofitting the correctness features is quite difficult.

The problem with shell scripts

Let’s focus on

 

To finish reading, please visit source site