getchar: shell func to read character values