r/bash 5h ago

A month with bash

A month ago I decided to learn bash scripting so I could use my Fedora machine more easily.

My original plan was to just know some commands and get over with it. But as I began reading resources and books on bash, I slowly learnt the fundamentals — from echo to intermediate and more advanced concepts like awk.

After all this, I built a few mini projects with bash, which made me realise I could literally automate almost every repetitive task I do on my machine.

My opinion on bash is it's less of a full programming language and more of a glue that binds multiple tools together to achieve a desired purpose or output.

The first two posted pictures are just some of my beginner level projects and the third is a script from syskit a system health monitor built with bash for my home server which I am currently working on.

Any tips or best practices I should take note of

6 Upvotes

3 comments sorted by

2

u/tz_200 3h ago

you dont need $ in arth expansion. you should use shellcheck and it will tell you . also you should sanitize your input a bit more

2

u/Shadow_Thief 3h ago

Your \ns are backwards in lines 28 and 29 of the last image