Fix the syntax of the bash logic