Print everything till you hit :17B:, then you consider this the start of a record to watch for. Feed the lines that follow to an array till the first :35B: record, at which point you are ready to process this "block" between 17B and 35B. If there was a :16R:SECMOVE in between you print the first record of array, then the last, and then the rest, minus the last one, then go back to printing rows till you hit :17B: again. Of course spit out the array if there was no :16R:SECMOVE in there. Don't forget to empty the array before reuse.
Obviously if :16R: can occur before :17B: and still need to process it that way, just modify accordingly. Guess it would help if I knew anything about these records and if they have any kinda order or whatnot. You could probably do this as an AWK oneliner too.
In reply to Re: Is it possible to insert a record after line 5 that appears on line 10?
by AndyZaft
in thread Is it possible to insert a record after line 5 that appears on line 10?
by dirtdog
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |