I have a text file (fileA) that has the same block of text 100 times (approx)
I also have a text file (fileB) that has 100 (approx) values, one per line.
I want to search fileA, and each time pattern is found, replace pattern with the next line of fileB, i.e. replace the first occurence of pattern with the first line of fileB, the second occurence with the second line of fileB etc.
I searched a little on other tools for this problem and came upon this answer.
Bash: replace matching regex with nth line from another file
This worked for me, so this is what I went with.