Split input stream on newline