for num in {1..5}
do
perl simulate.pl file.txt file2.txt > output.txt
done
But my output is overwritten every time. I know their should be some kind of a simple answer to this which I don't know.
for num in {1..5}
do
perl simulate.pl file.txt file2.txt > output.txt
done
But my output is overwritten every time. I know their should be some kind of a simple answer to this which I don't know.
Either append at each iteration, or overwrite at the end.
Use
>>
to concat the contents into a file.>
will overwrite the file every time you write into it.