On Sat, 10 Apr 1999, guy keren wrote:

>On Thu, 8 Apr 1999, Alex Shnitman wrote:
>
>> > Does anyone know how to connect to a remote host by telnet using a shell
>> > script ?
>> > I need to get some data using a telnet.
>> 
>> man expect
>> Should get you started in 15 minutes.
>
>actually, you're throwing in a hammer when sometimes a small screwdriver
>would fit.
>
>or at least if this is for connecting to a port that requires no user name
>or password, and one has a shell script that should only get this
>addition, one might even do (using bourn shell, sh):
>
>MYVARIABLE=`telnet some.host.name 1234 | grep "the interesting line" | ..`

With current bash/telnet this does not work as expected. Telnet chokes if
its stdin is not a tty. I had to do things like `yes|telnet somewhere|...`. 

Peter


Reply via email to