3 ms·
A pipeline without pipes connecting is just a field of shit
by kortilla 2y ago
A pipeline without pipes connecting is just a field of shit
- MathMonkeyMan 2y agoIO redirection doesn't construct a pipe, but piping does. # Open foo.txt and use it as fd 0 in jq <foo.txt jq '[1,2,3]' # Create a pipe(). Use the write end as cat's fd 1 and the read end as jq's fd 0 cat foo.txt | jq '[1,2,3]' Best thing would be a directed graph where each node is a process or a file. A process has at most one edge going into it (stdin) and at most two coming out (stdout and stderr). A file has exactly one edge touching it. Hard to do in text, though. Would look like lisp.