On Thu, 2022-01-27 at 18:09 +0000, Harald van Dijk via austin-group-l at The Open Group wrote: > > I have to disagree. The use of "<newline> character" to me clearly > means > that the output of the command is processed as a sequence of > characters, > as opposed to a sequence of bytes.
While not being an expert at all, I'd also rather agree with Geoff here. No one writes "newline byte" ... and the only reference to "character" in the text (that goes about the output in the command) seems to be newlines. OTOH, it quite clearly says: "replacing the command substitution (the text of command plus the enclosing "$()" or backquotes) with the standard output of the command". And hasn't it always been the case that stdout/in can contain arbitrary binary data? This is done by gazillions of tools, including such standardised by POSIX (cat, tr, even printf via \ooo sequences). OTOH: 3.368 Standard Output "An output stream usually intended to be used for primary data output." And: "3.370 Stream "Appearing in lowercase, a stream is a file access object that allows access to an ordered sequence of characters, as described by the ISO C standard. Such objects can be created by the fdopen(), fmemopen(), fopen(), open_memstream(), or popen() functions, and are associated with a file descriptor. A stream provides the additional services of user-selectable buffering and formatted input and output; see also STREAM." This however links to Standard I/O Streams ( file:///usr/share/doc/susv4/susv4-2018/functions/V2_chap02.html#tag_15_05 ) which very well names byte output modes (fputc and so on). Thanks, Chris.
