Hi there. I have a very large file and I am trying to format it so that I can pull out certain pieces of data/info and report it in spreadsheet format/style.
The file has ###### which will separate each line that will be listed in the spreadsheet. Whenever I find "No" at the end of a line I want to be able to print info from the previous lines before finding the No. I want to be able to print second and third entry on the line previous lines with the "=" and then the Director Identification, the Director Port all on one line in a spreadsheet format.
I'm sure this can be done using awk programming but I am really struggling to find the correct syntax to use. My main problem has to do with pulling data that is ahead of finding the "No". You will see that in my extract below that in the first set of data between the ##### that the No appears on the last line so the Director Identification and Port will be the ones just above that No where as in the next set of data the No is not the last line....
For example in the extract from the file below I want the output to be
SEIDBABAK01_212E4_VMAX2673 10000000c93212e4 FA13e1 FA-8F 0
POST07_HBA_1_VMAX2673_FA_5F1 10000000c93d51d7 FA-5E 0
Below is the extract from the file...
="SEIDBABAK01",="SEIDBABAK01_212E4_VMAX2673_FA13e1",="10000000c93212e4",="SEI_FABRIC_1_BOTTOM",="Switch_9"
Symmetrix ID : 000192602673
Director Identification : FA-13E
Director Port : 1
User-generated Logged On
Identifier Type Node Name Port Name FCID In Fabric
---------------- ----- --------------------------------- ------ ------ ------
10000000c93212e4 Fibre 10000000c93212e4 10000000c93212e4 618180 Yes Yes
Director Identification : FA-8F
Director Port : 0
User-generated Logged On
Identifier Type Node Name Port Name FCID In Fabric
---------------- ----- --------------------------------- ------ ------ ------
10000000c93212e4 Fibre 10000000c93212e4 10000000c93212e4 618180 No No
####################################################
BLANK,="POST07_HBA_1_VMAX2673_FA_5F1",="10000000c93d51d7",="SEI_FABRIC_2_TOP",="Switch_10"
Symmetrix ID : 000192602673
Director Identification : FA-5E
Director Port : 0
User-generated Logged On
Identifier Type Node Name Port Name FCID In Fabric
---------------- ----- --------------------------------- ------ ------ ------
10000000c93d51d7 Fibre 10000000c93d51d7 10000000c93d51d7 680913 No No
Director Identification : FA-5F
Director Port : 1
User-generated Logged On
Identifier Type Node Name Port Name FCID In Fabric
---------------- ----- --------------------------------- ------ ------ ------
10000000c93d51d7 Fibre 10000000c93d51d7 10000000c93d51d7 680913 No Yes
####################################################