Too Long; Didn't Read
After making a lot of mistakes and messy scripts, I am sharing my experiences for writing a good shell script. I am a lazy DevOps Engineer. So whenever I came across the same task more than 2 times I automate that. So let’s create a problem statement for ourselves and then try to solve it via shell scripting with best practices. Here is the list of things that should always be taken care of while writing a shell script. The list includes functions, variables, the lifespan of a script, logging, help page, command sanity.