How can I quickly write a large file where each line has the string "aaa"?
this method is slow
I let it run for about 20 seconds and stopped it 'cos it was slow and it wrote maybe 20,000 lines far from 200,000
I could write a program test.rb in eg rubyC:\blah>for /L %f in (1,1,200000) do @echo aaa >>abigfile1.txt
and run ruby test.rb >bigfilei=0
while i < 200000 do
puts("aaa")
i+=1
end
that runs fast, does the whole task within a second
But ruby is a third party program that not everybody would have installed.
i'm wondering if there is a way to do it without a third party program, that is as fast ore pretty fast like within <= 3 seconds.. That somebody can run and produce that file?
TIA