3 ms·
I’m seeing this for the first time and don’t quite get the usefulness of this interface, can you help me? I mean, file descriptor numbers instead of ordinary op
by unkulunkulu 5y ago
I’m seeing this for the first time and don’t quite get the usefulness of this interface, can you help me?
I mean, file descriptor numbers instead of ordinary options provide some i/o semantics, but I have to remember the descriptor numbers? Is there some mnemonic/logic behind the ids?
- o8r3oFTZPE 5y agoFair question. Im not the author so can only make a guess (other readers of HN surely know far more than I about these subjects). However I suspect the rationale is related to whats been called "Bernstein chaining". https://cr.yp.to/proto/ucspi.txt https://cr.yp.to/proto/ucspi.txt http://www.catb.org/~esr/writings/taoup/html/ch06s06.html http://www.catb.org/~esr/writings/taoup/html/ch06s06.html https://skarnet.org/software/execline/grammar.html https://skarnet.org/software/execline/grammar.html https://www.oilshell.org/blog/2017/01/13.html https://www.oilshell.org/blog/2017/01/13.html
- unkulunkulu 5y agoHmmm, now I don’t get how Bernstein chaining relates to file descriptor interface. I’m curious about specifically the `4<infile` you seem to be admiring, you just observed its unusualness or do you see how its more powerful than the more common `-input infile`?