Or use gnuwin32's grep on the output of putty's plink.exe (which is the command-line client). I am able to successfully plink -batch -ssh ... | grep ... for what I need.

I was about to complain that I need a serial connection, but plink can do that, too! Cool, I never would have thought of using plink for anything else but SSH and telnet. Thank you, pryrt++.

plink -serial COM24 -sercfg 115200,8,n,1,N

... works for reading debug output from the microcontroller, but my ancient grep binary seems to buffer an insane amount of data before writing. It simply does not output anything when fed with just a few hundred lines. Replacing it with perl (from Strawberry) works fine:

plink -serial COM24 -sercfg 115200,8,n,1,N | perl -ne "/^(Pct|NRS)/ && + print"

Now I just have to test it with ConEmu proposed by aitap++.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

In reply to Re^4: [OT] Filtering / Highlighting serial port input / PuTTY output by afoken
in thread [OT] Filtering / Highlighting serial port input / PuTTY output by afoken

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.