×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

awk compare columns and rows

awk compare columns and rows

awk compare columns and rows

(OP)
Good Morning.
I am new to awk so please be patient.

I have a files that looks like this:

QQQQ "QRST 1212" SELL 8885.00 0 3 09283000
QQQQ "QRST 1212" SELL 8900.00 0 1 09460800
QQQQ "QRST 1212" SELL 8905.00 0 5 09465600
QQQQ "QRST 1212" BUY 8900.00 2 0 09484400
QQQQ "QRST 1212" BUY 8915.00 10 0 09501500
QQQQ "QRST 1212" BUY 8915.00 4 0 09511300
QQQQ "QRST 1212" SELL 8950.00 0 2 10465900
QQQQ "QRST 1212" SELL 8950.00 0 4 10491800
QQQQ "QRST 1212" SELL 8950.00 10 0 10491800
QQQQ "QRST 1212" BUY 8950.00 0 10 10491800
QQQQ "QRST 1212" SELL 8950.00 0 16 10491800
QQQQ "QRST 1212" BUY 8960.00 16 0 10491800

My Goal is print out a list with the same price ($4) Quantity ($5 or $6) and time ($7) only if $3 is different in the next row.

Output would look like:
QQQQ "QRST 1212" SELL 8950.00 10 0 10491800
QQQQ "QRST 1212" BUY 8950.00 0 10 10491800
QQQQ "QRST 1212" SELL 8950.00 10 0 10491800
QQQQ "QRST 1212" BUY 8950.00 0 10 10491800



Any help will be appreciated!


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close