My input is present as shown below
output should be:
I mean to say when ever I find "&line." in my input record then total 4 records should copy to output file by replacing &line. as 1,2,3,4.