[SunHELP] double IO redirection
sunhelp at sunhelp.org
sunhelp at sunhelp.org
Mon Jan 29 12:55:34 CST 2001
What you need is to use/install expect.
Does exactly what you are looking to do.
Mark
Please respond to sunhelp at sunhelp.org
To: sunhelp at sunhelp.org
cc: (bcc: Mark Sailer/GTS/NYC/INSTINET)
Subject: Re: [SunHELP] double IO redirection
> > >
>> >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.
>> >Nick Dronen
>
> Since the description still isn't very clear about all that can
>really be suggested
>is to use the exec command to redirect stdin from a file in your script. The
> "<" symbol is for STDIN redirection and the ">" symbol is for STDOUT
>redirection. You should probably read the man page for sh (or whichever
>interpreter you wish to accomplish this in).
Basically I have a shell script that needs to perform some automated
tasks over a network. For example say i wanted to automate a login
process. I want to be able to write a script that reads from the
output of telnet and then writes its responces accordingly outputting
them to telnet. is that possible in plain BASH?
_______________________________________________
SunHELP maillist - SunHELP at sunhelp.org
http://www.sunhelp.org/mailman/listinfo/sunhelp
More information about the SunHELP
mailing list