Validating user input in shell script