thunderkid
Technical User
I am attempting use awk to add blanks line to records so that I can perform further processing on them. Here is sample of data format:
1.0001 ISR000012 ABFG 1257 IDIE
1.0002 ISR000012 ABAC 4563 DDFF
1.0002 ISR000012 GHFD 5698 RTTT
1.0003 ISR000012 DSAD 4567 KDLS
1.0003 ISR000012 DSAD 4567 KDLS
1.0003 ISR000012 DSAD 4567 KDLS
1.0023 ISR000012 LGKR 8912 OLIS
.
.
.
DESIRED
1.0001 ISR000012 ABFG 1257 IDIE
1.0002 ISR000012 ABAC 4563 DDFF
1.0002 ISR000012 GHFD 5698 RTTT
1.0003 ISR000012 DSAD 4567 KDLS
1.0003 ISR000012 DSAD 4567 KDLS
1.0003 ISR000012 DSAD 4567 KDLS
1.0023 ISR000012 LGKR 8912 OLIS
.
.
.
I want to compare the first two fields and add a blank line after the last record that match. Where there is no match for a record, a single line would be added as shown in the first record in the example.
Thanks for your inputs!
Thunderkid
1.0001 ISR000012 ABFG 1257 IDIE
1.0002 ISR000012 ABAC 4563 DDFF
1.0002 ISR000012 GHFD 5698 RTTT
1.0003 ISR000012 DSAD 4567 KDLS
1.0003 ISR000012 DSAD 4567 KDLS
1.0003 ISR000012 DSAD 4567 KDLS
1.0023 ISR000012 LGKR 8912 OLIS
.
.
.
DESIRED
1.0001 ISR000012 ABFG 1257 IDIE
1.0002 ISR000012 ABAC 4563 DDFF
1.0002 ISR000012 GHFD 5698 RTTT
1.0003 ISR000012 DSAD 4567 KDLS
1.0003 ISR000012 DSAD 4567 KDLS
1.0003 ISR000012 DSAD 4567 KDLS
1.0023 ISR000012 LGKR 8912 OLIS
.
.
.
I want to compare the first two fields and add a blank line after the last record that match. Where there is no match for a record, a single line would be added as shown in the first record in the example.
Thanks for your inputs!
Thunderkid