Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7001173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:46:10+00:00 2026-05-27T20:46:10+00:00

I am working on a test bench to model some hardware. Each line acts

  • 0

I am working on a test bench to model some hardware. Each line acts as a test-case. I have the following:

File-In –> MyModel –> File-out

I also have a File-reference that my output must match.

When in development, many mismatches exist between the output and the reference. I need to know the line numbers that differ, then copy those lines from File-In to File-In-bugs
So I can run MyModel with the buggy lines for quicker debugging.

[Edit] Example for my files

INPUT (Actual workloads have millions of lines)

100 000 0008EDF3FCFF3FCFF3FCFF3FCFF3342B 00084000000000000000000000507F1A
100 000 0008F800000000000000000000000004 80074000000000000000000000420000
101 000 0006C0000000000001A0308801C00000 0008E000000000000000000030A61108
100 000 80020000088C00000000000000000000 8008EDF3FCFF3FCFF3FCFF3FCFF3FF9F
100 000 00090413FCFF3FCFF3FCFF3FBE75EF5B 0006C0000000000014CB826109E00000
101 000 000903B0000000000000001A9CC23829 000840000000000000006A7308E0A410
101 000 00068000000000000000000C08000000 00090220000000000000000000000003
100 000 800902A3FCFF762DE9F248E6F44B625F 9806A1404555A482BB52150248C00000
100 000 0006C0005BE1D493AB588D1E49E00000 00094011E4FF3FCFE68E3CFC3C46251E
100 000 8006C0017B35F0E248B64BC001000000 000940704000000095B6F470A2AB22E0

OUTPUT

14088FF3FCFF3FCFF3FCFF3FCFF3FCFF 00000
18088FF3FCFF3FCFF3FCFF3FCFF3FCFF 00000
8C088FF3FCFF3FCFF3FCFF3FCFF3FCFF 00000
94088FF3FCFF3FCFF3FCFF3FCFF3FCFF 00000
10088DF3FCFF3FCFF3FCFF3FCFF3FCFF 00000
640895F3FCFF3FCFF3FCFF3FCFF3FCFF 00000
88088DF3FCFF3FCFF3FCFF3FCFF3FCFF 00000
E00895F3FCFF3FCFF3FCFF3FCFF3FCFF 00000
04088793FCFF3FCFF3FCFF3FCFF3FCFF 00000
1C088093FCFF3FCFF3FCFF3FCFF3FCFF 00000

REFERENCE files are identical to the correct output, but bugs may lead to change one ore more hex characters. At lines with bugs, the File-In shall be copied to a new file, File-In-bugs. I hope this makes the problem more clear.

What I did so far is not much. I think linux pipes can be useful.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T20:46:11+00:00Added an answer on May 27, 2026 at 8:46 pm
    diff --old-line-format '%L' --new-line-format '' --unchanged-line-format ''  File-out File-Reference 
    

    Will produce an output of only showing the lines that can be found only in File-out, but it won’t provide line numbers. If you really need that in your output:

        diff --old-line-format '%L' --new-line-format '' --unchanged-line-format ''  <(nl File-out) <(nl File-Reference)
    

    should work.

    Update: answering the comment below:

    diff --old-line-format '%L' \
         --new-line-format '' \
         --unchanged-line-format '' \
         <(nl File-out) <(nl File-ref) | \
    awk '{print $1 "p"}' > BUGLINEPRINTER.sed && \
    sed -n -f BUGLINEPRINTER.sed File-In > File-In-bugs
    

    Will do what you want. You can do it many other ways OTOH.

    HTH

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been working on test framework, which creates a new app domain to
I have mocks working where I test that methods on my mocked object are
I'm working on a little test application at the minute and I have multiple
I'm creating a web test client for some services I'm working on, and as
I am working in cross platform C++, and have some classes defined like so:
Working with Test::Unit and Shoulda. Trying to test Users.create . My understanding is that
I'm working on a test framework in Perl. As part of the tests, I
I am working on a test server with an Oracle 11g installed. I was
Background: Trevor was working on a test project solely for the purpose of trying
I use Assert.Fail a lot when doing TDD. I'm usually working on one test

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.