use [[ consistently in bash scripts