using case in bash instead of if