๐—ช๐—ต๐˜† ๐—œ ๐—ฅ๐—ฒ๐—ฝ๐—น๐—ฎ๐—ฐ๐—ฒ๐—ฑ ๐—ก๐—ผ๐—ฑ๐—ฒ.๐—ท๐˜€ ๐˜„๐—ถ๐˜๐—ต ๐Ÿฏ๐Ÿฌ ๐—Ÿ๐—ถ๐—ป๐—ฒ๐˜€ ๐—ผ๐—ณ ๐—•๐—ฎ๐˜€๐—ต

I used to run a Node.js service to notify Google and Bing of URL changes.

The Node.js version worked. It also had forty dependencies. It required a runtime. It broke three weeks later because of a minor version update in a library.

For a task that runs once a day, that was too much maintenance.

I deleted it. I rewrote it in thirty lines of Bash using curl, openssl, and jq. It has run every night since without a single update.

Here is when this trade works.

Use Bash for narrow, stable, I/O-bound tasks. If you only need to call an API, parse small JSON, and log results, Bash is a great fit. No dependencies is a feature.

The benefits:

But do not use Bash if your task grows.

The advantages flip the moment you need more complexity.

Avoid Bash if you need:

The choice is not Bash versus Node.js. The choice is about how much your requirements will change.

A script that does one stable thing on a timer is perfect for Bash. The moment you need state, tests, or teammates, you should switch back to a real programming language.

I keep my Bash script because it stays small. I chose it knowing it would stay simple.

Use boring, dependency-free tools only as long as the task stays boring. The skill is knowing when to stop.

Source: https://dev.to/tkpdx01/why-i-replaced-a-nodejs-service-with-30-lines-of-bash-and-when-you-shouldnt-4eip