Getting output at each loop execution

Hi all lammps users,

I am running a loop in my lammps input file, the length is 10, to shear the simulation box and at each iteration I want to get one particular set of output. so, there should be 10 output lines when finish the loop runs. but I am getting only one output line which is related to the last loop index. I believe this is something I overwrite the same file. Anyone can give me an idea to stop over writing the data, but I want to write all outputs into the same file at each loop runs. I am sorry if I am asking something very simple which is supposed to figure out myself.

output generates with this command:
fix cal all ave/time 1 $a $a v_mystrain c_pe c_stress[4] v_pxy file dump.pxy

Have you tried to ask for run 10 instead of run 1?

I am sorry if I made you confused. I was expecting 10 lines of output after loop is over. Because the length of the loop is 10 and each execution creates single line of output and all together should be 10 lines. But I got only 1 line of output which is related to very last loop run. I think I am overwriting the same file after at each loop run. I want to avoid this and want to write all ten lines in a single file after the simulation.

Thanks for your quick response.

Also I think I made a mistake in the original email… Now i would correct that specific line I wrote there as,

output generates with this command:
fix cal all ave/time 1 1 1 v_mystrain c_pe c_stress[4] v_pxy file dump.pxy