I have an output of an analysis and I would like to grep a keyword "X" -which always appears- every time a phrase "Y" occurs. The keyword "X" appears many times but I would like to get only the subsequent after "Y".
For example, I would like to get the subsequent Folder name every time Iter = 10 occurs, i.e. F1, F4.
Iter = 10
Folder = F1
Iter = 5
Folder = F2
Iter = 6
Folder = F3
Iter = 10
Folder = F4
Any ideas?
Hexdump -c output of file (as requested by @Inian):
0000000 I t e r = 1 0 \n F o l d
0000010 e r = F 1 \n \n I t e r
0000020 = 5 \n F o l d e r = F 2 \n
0000030 \n I t e r = 6 \n F o l d
0000040 e r = F 3 \n \n I t e r
0000050 = 1 0 \n F o l d e r = F 4
0000060 \n
0000061