If block error handling in bash : <p>I have if statements with multiple lines of code in bash, sometimes while running the script any of lines of code thrown error message so could you please let me know how  to handle errors. I just wanna catch the error and display some error message to identify, and also I do not want to stop the running scripts, since it has 7800 lines of code I wanna continue with the next steps. each test steps are inside if loop. I want to know how to handle errors inside the if loop which having series of lines of code.</p>

<p>Thank you so much for help.</p>
