pls help! complex find and replace

help pls...

i would like to change this

CURVE2 565489 789458 1258649
random data here...
CURVE2 565489 568795 6548921
random data here...
CURVE2 565489 123598 6446259
random data here...
CURVE2 565489 672956 2489657

into this

CURVE2 565489 586423 1258649
random data here...
CURVE2 565489 586423 6548921
random data here...
CURVE2 565489 586423 6446259
random data here...
CURVE2 565489 586423 2489657

basically i need
CURVE2 565489 XXXXXX

into
CURVE2 565489 586423

i just want the "XXXXXX" to change into "586423" when it finds the pattern "CURVE2 565489"

thanx in advance...

  1. read the rules of unix.com. it is "please" not "pls"!

  2. show us what you've done so far and where your problems are.

I apologize if I violated some of the rules. I would like to understand which rule I violated. By your statements above, I am guessing it's my lexical abilities or lacking thereof. Is it my use of "pls" for please? Is it rule 11?

I assume you are very well respected in this forum but it seems some of your corrections have a hint of something which is unfounded. I did a quick search for the words "DukeNuke2 pls' and you have a bunch of replies with users who used the word "pls" for please and used headers with the word "pls" and yet, you have failed to correct those users of their infraction.

So please enlighten me about my infraction(s).