this gives me different file with the names of each coordinate.txt. I want to run this command in a way that inspite of getting so many output files in my case 2500 files, how can I get only one output file with each filename as header follwed by the output data of that file.
So I am getting coordinate 1.txt, coordinate 2.txt ...... and so on as output but I want to get output in one file like
coordinate 1
output data
coordinate 2
outputdata
..... and so on

I have 2500 coordinates in this way. I want to plot the data points from each coordinates afterwards which will be easier if all data is contained in one file rather than in 2500 files separately.