4 ms·
Seems like maybe we should create a convention by which output from a library or program can be ignore by critical processes, so that comments and notes could b
by K0balt 3y ago
Seems like maybe we should create a convention by which output from a library or program can be ignore by critical processes, so that comments and notes could be inserted, like // or # notation in code? //this depreciation notice may be given to the terminal but it will be ignored by any process that digests this output// or something like that?
Or just use stderr?
- tenebrisalietum 3y agoMaybe FD 3 should be stdwarning.
- aezart 3y agoYeah, a third output would be nice to have. For example, grep could use stdout to print the actual matches it finds, stderr for any files it was unable to open, and a third stream to show the progress of the search.
- emeraldd 3y agoOutput to Stderr can also break things, particularly in dot files or from applications that tend to output meaningful information to stderr.
- JdeBP 3y agoThe warnings that M. Siebennmann hit (since this has come up again this year) were going to standard error. If you write to standard error in a cron job, mail gets sent to root. All of the cron jobs using fgrep and egrep were suddenly mailing root, every single run, even when nothing went wrong.
- tonyg 3y agoYep. Unix' "everything is a stream of bytes" hoist by its own petard, again.
- __turbobrew__ 3y agoYea, this seems like a good place to use stderr. Many ci/cd systems as well as subprocess libraries will concatenate stdout and stderr, but it is better than printing the warnings to stdout.