3 ms·
First: Standard error is not just for formatted error messages. It is ironic that this is based upon dealing with REPLs when Unix shells, one of which is even
by JdeBP 8y ago
First: Standard error is not just for formatted error messages. It is ironic that this is based upon dealing with REPLs when Unix shells, one of which is even available on the WWW site, use standard error for their prompts and for their interactive line editors. Users do like to put control sequences in their prompts.
* https://unix.stackexchange.com/a/434839/5132 https://unix.stackexchange.com/a/434839/5132
Second: Even as an example that read() implementation is exceedingly bad. It is stack frame corruption waiting to happen.
Third: This is another example of hardwiring control sequences for a particular class of terminal and not respecting TERM=dumb. It probably won't be a problem for the WWW site, but it will for the underlying general-purpose tool.