I want to read each line of a file and then take each line and produce a file with the lines data in it.
For example let say the file I want to read is named txt.txt and it has the below 4 lines:
data for the first row data for the second row data for the third row data for the fourth row
I would like to produce 4 output files, each with a single line from the input file. So there would be 4 files that are produced after reading the input file. One named text1.txt (it would have the first line of data in it), one named text2.txt (it would have the second line of data in it), and so on.