I have a document that looks like this:
Every two lines is a record ..
I don't know how to specify that every other line begins a new record. In the example above the word "CLASS" begins each record.
I ultimately am trying to get the 2nd field on the "CLASS" line and the 10th field on the "INFO" line. I can probably figure that part out .. I just need to know how to separate the records.
Thanks
p.s. Just to verify .. Is it true that I can't specify the record separator on the command line.. for example
Code:
CLASS windows_mls *NULL* 0 500000 0 *NULL*
INFO 13 0 0 0 *NULL* 0 0 1 1 0 0 0 0 0 0 0 0 0 1115911974 1BA88D601DD211B2B11E00306E06A3D4
CLASS windows_mls2 *NULL* 0 500000 0 *NUL*
INFO 13 0 0 0 *NULL* 0 0 1 0 0 0 0 0 0 0 0 0 0 1115911974 1BA88D601DD211B2B11E00306E06A3D4
CLASS windows_phant *NULL* 0 500000 0 *NULL*
INFO 13 0 0 0 *NULL* 0 0 3 1 0 0 0 0 0 0 0 0 0 1107878302 42408BF81DD211B2A98600306EF463F7
CLASS windows_serv *NULL* 0 500000 0 *NULL*
INFO 13 0 0 0 *NULL* 0 0 3 0 0 0 0 0 0 0 0 0 0 1107874552 86DFF09A1DD211B299BF00306EF463F7
CLASS windows_servers_1236407 *NULL* 0 500000 0 *NULL*
INFO 13 0 0 0 *NULL* 0 0 3 0 0 1 0 0 0 0 0 0 0 1107874552 86DFF09A1DD211B299BF00306EF463F7
Every two lines is a record ..
Code:
CLASS windows_mlinks *NULL* 0 500000 0 *NULL*
INFO 13 0 0 0 *NULL* 0 0 1 0 0 0 0 0 0 0 0 0 0 1115911974 1BA88D601DD211B2B11E00306E06A3D4
I don't know how to specify that every other line begins a new record. In the example above the word "CLASS" begins each record.
I ultimately am trying to get the 2nd field on the "CLASS" line and the 10th field on the "INFO" line. I can probably figure that part out .. I just need to know how to separate the records.
Thanks
p.s. Just to verify .. Is it true that I can't specify the record separator on the command line.. for example
Code:
cat something.txt | awk -F = "\n" ; -RS = "" ...