Using variables and conditional statements in Bash