[SunHELP] double IO redirection
Big Endian
sunhelp at sunhelp.org
Mon Jan 29 11:15:11 CST 2001
>On Fri, Jan 26, 2001 at 11:15:58AM -0500, Big Endian wrote:
>> Is it possible in bash or the Bourne shell to redirect the standard
>> output of a child process into its standard input while redirecting
>> bash's output into the child's input? Am I insane or is it possible?
>
>Your question is odd. Both your shell and the program your shell forks
>and execs use your tty/pty as stdin/stdout/stderr . . . so what are you
>trying to accomplish? Describe the situation.
>
>Regards,
>
>Nick Dronen
If you do a ps -ef|grep 'foo'|grep -v 'grep' you redirect the stdout
of ps into the first grep's stdin which redirects it's stdout into
the second grep's stdin. This is pretty standard stuff, however I
want to be able to execute a subshell in which the subshell and a
second process have their I/O redirected to eachother. For instance
I want to execute a subshell and have its stdout goto a telnet
process's stdin and the telnet's stdout goto the subshell's stdin.
I'm just wondering how to do this in a shell script if it is possible at all.
More information about the SunHELP
mailing list