Re: flush telnet input
From: John L (jl_at_lammtarra.notthisbit.fslife.co.uk)
Date: 07/19/05
- Next message: Scott: "Re: flush telnet input"
- Previous message: Ted Timar: "Welcome to comp.unix.shell [Frequent posting]"
- In reply to: Scott: "flush telnet input"
- Next in thread: Scott: "Re: flush telnet input"
- Reply: Scott: "Re: flush telnet input"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 19 Jul 2005 07:28:31 +0100
"Scott" <ssNO@SPAMaao.gov.au> wrote in message news:pan.2005.07.19.04.14.45.338221@SPAMaao.gov.au...
> Hi all,
>
> I wish to send a simple command via telnet such as:
>
> echo "my_command arg1 arg2" | telnet host port
>
> but I'm finding that my program running on $host:$port
> doesn't actually receive the command. (It only accept()s &
> close()s the connection.)
>
> I can solve my problem with a delay:
>
> (echo "my_command arg1 arg2" && sleep 1) | telnet host port
>
> However I don't really want to do that as sometimes I have
> multiple commands to send (& the time it takes to finish varies)
> & it is useful to me that control returns to my shell ASAP.
>
> I suspect that the telnet program is receiving a SIGPIPE
> before it is able to actually send out the commands.
>
> So, my question is:
>
> How can I get telnet to flush the commands before it closes
> the connection & returns control to my shell?
>
> Any info/pointers muchly appreciated.
>
Are you using telnet in line rather than character mode?
-- John.
- Next message: Scott: "Re: flush telnet input"
- Previous message: Ted Timar: "Welcome to comp.unix.shell [Frequent posting]"
- In reply to: Scott: "flush telnet input"
- Next in thread: Scott: "Re: flush telnet input"
- Reply: Scott: "Re: flush telnet input"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|