willmo has it right. Though, one might argue that if the program accepts a command line argument and the argument is wrong, it should simply exit rather than prompt for input. What happens when this script is run without a tty for someone to provide input on?