[bash] Read user input inside a loop