3 ms·
You can work around this with other shell trickery. This might work in your shell: $ program <(cat) <(cat) The program itself isn't involved in opening t
by philsnow 10y ago
You can work around this with other shell trickery. This might work in your shell:
$ program <(cat) <(cat)
The program itself isn't involved in opening the TTY / reading from it, etc, that is all handled by your shell before fork/execing program. program doesn't know that any of these shenanigans have happened.
It probably uses more memory (the shell has to have both stdin's in memory before it can exec the program), but overall I have mostly abandoned trying to use '-' as an input because of the way some tools, perhaps less-steeped in unix-y traditions, don't honor it correctly.