I need to define a bash variable called failed and set the value to False. When my script is called from a cron job, specific tasks might fail, and then I need to flip failed to True. Based upon $failed, I need to send an email alert that my cron job has failed. So how can I declare and use Boolean variables in a shell script running on a Linux server?
The post How to declare Boolean variables in bash and use them in a shell script appeared first on nixCraft.