3 ms·
> The shell isn’t in charge of what data commands print out. It could be if it captured stdout of processes it launches. Of course, the program would have to
by dragonwriter 7y ago
> The shell isn’t in charge of what data commands print out.
It could be if it captured stdout of processes it launches.
Of course, the program would have to output a structured format that the shell recognized to provide the shell the option to do what is described upthread, so legacy programs wouldn't fit in well with it unless the shell was programmed with how to extract structured data from their unstructured output.
- hnlmorg 7y agoI think I'd rather keep STDOUT et al as byte streams but include an additional channel with details about how to read that data. eg it could describe the data as a JSON array and the next command would grep through the elements rather than lines.