开发者

/bin/sh: How to redirect from &3 to named pipe?

I have a background process read from named pipe. for example

mkfifo /tmp/log.pipe

./myprog.sh < /tmp/log.pipe

I want to use &3 instead of开发者_如何学运维 specify /tmp/log.pipe

echo "aaa" >&3 but results similar to echo "aaa" > /tmp/log.pipe

How can I redirect &3 to /tmp/log.pipe everytime.


exec 3>/tmp/log.pipe
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜