If you are using bash then rather than mixing [ and [[, you should stick with one or the other, preferrably [[. See What is the difference between test, [ and [[ ?
You might also want to consider preferring printf over echo for a more robust approach. See this amazingly detailed analysis of why printf is better than echowhy printf is better than echo.