I have a single input file that needs to be replicated multiple times with a little change in every file i.e every 30th line in every file is to change.
My main text file name is D0.txt which I need to replicate multiple numbers time. and in that line 30 is "variable D1 equal 0.0 "
Now for the first time when I replicate this file
I would like to change that string to " variable D1 equal 1 "
and then save the file as D1.txt.
Similarly, I would like to create suppose 5 files then I would like to loop it 100 times.
so files are saved in a folder as
D2.txt and so on with each of their line 30 as "Diameter = $n" sample text file format is attached below. and desired format of files in folder.