Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • Could you possibly give some background to your question, a reason for needing a new standard stream? Also, what would be communicated on this stream that could not be communicated on the standard input, standard output, or the standard error stream? Commented Aug 22, 2021 at 20:07
  • I'm not expecting to actually do this, to be clear. There are a lot of suggestions on how to pipe structured data between programs. There are tools like the relatively new "jc" which provide generic parsers for textual output of a bunch of programs. There's whatever power-shell is doing... A new stream is another way to handle it, and I'd love to talk about the advantages and disadvantages of that approach, but I don't think stack exchange will let me as it's too broad of a topic. Commented Aug 23, 2021 at 13:58
  • The thing about the standard streams is that there is nothing saying anything about what format the data should have on these streams. In fact, data may be JSON, GZip compressed binary, line-based text records, CSV, or whatever else. It sounds as if you're talking about a stream that enforces something like a standard format. Is that correct? Commented Aug 23, 2021 at 15:35
  • I think there's a big difference between machine-optimized and person-optimized formats. Json is an obvious option for a machine-optimized format, but I wouldn't want LS to output json by default. A /dev/stddata node could make sense as well, which could support multiple machine-readable data formats. I think the important thing is to have a separate stream for machine-readable data. Alternatively a way to tell if the command ahead in the pipeline wants machine-readable data could be nice. The same way color gets "magically" stripped if you're piping to not a tty. Commented Aug 24, 2021 at 15:49