Detect if stdout is redirected to a pipe (not to a file, character device, terminal, or socket)?

后端 未结 5 891
粉色の甜心
粉色の甜心 2021-02-14 20:50

Ideally, this would be scriptable in shell, but Perl or Python would be fine. C code could be helpful, but probably fails cost/benefit.

I recognize that redirection to a

5条回答
提交回复
热议问题