Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Th dmp4.results and the dmp4.piped are identical.

When I then go and run:

C:/> perl < dmp4.piped

It works.

When however I run it with "perl COM1 | perl" it doesn't work.

The COM1 identifies the com port. It is part of a basic unit testing framework for a consumer electronics device.

The code for follows:

#!perl use strict; use warnings; my %results = (); my $total; my $command = ''; my $result = ''; while (<STDIN>) { chomp; next if /^\s*$/; if (/^COMMAND:\s+(.*)$/) { $command = $1; } if (/^RESULT:\s+(.*)$/) { $result = $1; print "$result: $command \n"; $results{$result}++; $total++; } } print "\n"; print "TESTS: $total "; foreach (keys %results) { print "$_: " . $results{$_} . " (" . abs($results{$_} * 100 / $tot +al) . "%) "; } print "\n";

A sample of the dmp4.piped follows:

COMMAND: mc creation TIMEOUT: 3 Creating various ContentData objects SUCCESS: Up-Casting HMediaAudioCD to HMediaCD SUCCESS: Up-Casting HMediaImageCD to HMediaCD SUCCESS: Up-Casting HMediaVideoCD to HMediaCD Working with const ContentData objects SUCCESS: Creation of new const-pointer HMediaAudioCD initialized w +ith non-const handle SUCCESS: Up-casting constHMediaAudioCD to constHMediaCD SUCCESS: Const-Casting from constHMediaAudioCD to HMediaAudioCD SUCCESS: Down-casting from constHMediaCD to constHMediaAudioCD SUCCESS: Making Const from cpHACDconst to ccpCD not successful RETURN: RESULT: PASSED COMMAND: mc attr TIMEOUT: 3 Creating HMediaAudioCD and add Title Attribute SUCCESS: HMediaAudioCD created SUCCESS: Checking for attribute "title" ERROR: Checking attribute value: This is my lif Changing value of Title attribute by re-adding with different valu +e SUCCESS: Checking for attribute "title" (2nd time) SUCCESS: Checking if attribute value was updated SUCCESS: Checking No. of attributes: 1 SUCCESS: Re-Checking No. of attributes: 1 SUCCESS: Removing attribute ERROR: Checking if attribute was really removed Adding more attributes SUCCESS: Attribute 0 has value A SUCCESS: Attribute 1 has value B SUCCESS: Attribute 2 has value C SUCCESS: Attribute 3 has value D SUCCESS: Attribute 4 has value E SUCCESS: Removing attribute at index 1 in list SUCCESS: Trying to remove non-existing attribute at index 5 ERROR: Removing all 4 Attributes: 4 elements left Checking setAttributeValue methods SUCCESS: Checking if setting value by name on non existing attribu +te prohibited SUCCESS: Checking if setting value by index on non existing attrib +ute prohibited SUCCESS: Setting value to new attribute SUCCESS: Re-setting value of existing attribute at index 0 Testing const char* - interface Adding attribute using const char* interface SUCCESS: Getting value of just added attribute SUCCESS: Checking if value of attribute is correct: somewhere over + the rainbow SUCCESS: Re-setting value of just added attribute using const char +* interface SUCCESS: Getting value of just changed attribute SUCCESS: Checking if value of attribute is correct: somewhere over + the rainbow RETURN: RESULT: FAILED

Any help appreciated.


Andrew Tomazos  |  |

In reply to Re^2: cmd.exe piping stress by tomazos
in thread cmd.exe piping stress by tomazos

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

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2023-11-30 17:03 GMT
Find Nodes?
    Voting Booth?

    No recent polls found