Sure. Let's go step by step with it. We have: a,b,c,d,e
1. I want to identify all lines of a file where a==d && b==e such that the bold line would be located
ALD,N,ALLIED CAPITAL CORPORATION,ALD,N
AFC,N,ALLIED CAPITAL CORPORATION,ALD,N
2. Next, when this happens, I want to search all other lines and find where a==d(newline) && b==e(newline):
ALD,N,ALLIED CAPITAL CORPORATION,ALD,N
AFC,N,ALLIED CAPITAL CORPORATION,ALD,N
3. When I find one of these lines, I want to append a(newline),b(newline) to the end of the original line such that:
ALD,N,ALLIED CAPITAL CORPORATION,ALD,N,AFC,N
AFC,N,ALLIED CAPITAL CORPORATION,ALD,N
4. There will be multiple instances where a==d(newline) && b==e(newline), and each instance of this will have a unique a(newline), b(newline), such that the final output will look something like:
ALD,N,ALLIED CAPITAL CORPORATION,ALD,N,AFC,N,a(newline0),b(newline0)...,a(newlinen),b(newlinen)
AFC,N,ALLIED CAPITAL CORPORATION,ALD,N
Is that more clear?