read one character at a time in bash