Collect user input from a stream / stdin