I can "telnet" to the server and run these commands, when the command sent out the result, I can input another command.

How do you know the command finished sending out the result? By the prompt you are given once it's done. Or maybe because you recognize the format of the output. Or maybe you assumed it was done based on the passing of time. Those are examples of the aforementioned "end of job marker".

A computer cannot detect the appropriate condition without being told what it is. There's too much variety in the possibilities. They usually come in two varieties:


In reply to Re^3: How can I determine the server is waiting for input in POE::Wheel::ReadWrite? by ikegami
in thread How can I determine the server is waiting for input in POE::Wheel::ReadWrite? by woosley

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.