Xavier Boschian wrote:
>
> We used telnet script to change configuration of routers and it works.
> We try to do the same with HP3K but without success.
>
> We want to connect from a Unix server to an HP3K to start a Job.
> Is there another way, rshd avaible on HP3000 ?
> Or could we stream a job via FTP ?
>
> Here is the "wrong" telnet script :
>
> telnet lx8 << EOF
> hello manager.sys\n
> passwd\n
> EOF
>
> Have a nice roll-over
> Xavier
Writing telnet scripts using the Unix telnet command can be tricky and
unreliable.
You need to remember that as soon as the Unix side tries to send something to
the 3000 side, it gets transmitted whether or not the 3000 (or any other
machine) is ready for it. So if the remote end isn't doing typeahead
buffering, you have problems.
The solution is sort of a kludge, but I've done this for certain simple
applications:
(sleep 3; echo "hello manager.sys"; sleep 3; echo "passwd"; sleep 3; echo
"command"; sleep 3; echo "bye"; sleep 3) | telnet lx8
The concept here is that you need to build in sufficient pauses between the
data you're trying to send so that the remote side will be ready to receive the
next chunk.
- Mark B.