If you don’t know, ask – if you know, share! ~ opensource mindset
by Marco Bravo
Take your Bash scripting to a new higher level using libraries with automation.
This article by no means represents the entirety of using Bash in automation. However, I tried to instill basic knowledge and recommendations that (if followed) will undoubtedly make your life easier. Then, even when things do become difficult, a firm understanding of the importance of runtime context will be handy.
Finally, scripting in or for automation can be unforgiving of mistakes. Having even basic unit tests in place for your libraries will both build confidence and help out the next person to come along (which could be you after five years of forgetting). You can find all of the example code used in this article online here.
Interested in brushing up on your Bash fundamentals? Check out:
tags: sysadmin - tools - bash - automation