Converted if condition to BASH native syntax. That improve script performance and the code is more readable.