from man seq:
-w, --equal-width
equalize width by padding with leading zeroes
not sure why it crashes, perhaps seq can't deal with so many numbers?
Updated script in post #13. :)
that took about 3min to run on Intel(R) Core(TM)2 Duo CPU T5870 @ 2.00GHz
tail file2
0499999991
0499999992
0499999993
0499999994
0499999995
0499999996
0499999997
0499999998
0499999999
0500000000
ls -lh file2
-rw-rw-r--. 1 cybernerd cybernerd 1.1G Jun 30 17:06 file2
this is either a quad core or its dualcore with hyperthreading but it seems i have 4 cpus
task manager shows cmd.exe isnt using more than 12%
Ill try it in python later see if it will run faster but im guessing its nearly done. It wont open in np++ any more
I cant get the python one to work, it just displays 50000000 for me..
root@ubuntu:~# ./test.py
0500000000
root@ubuntu:~# cat test.py
#!/usr/bin/python
count = 400000000
while count <= 499999999:
count = count + 1
print '0%s' % (count)
root@ubuntu:~#
You're running it directly, not outputting it? Will only show end result I'd assume?
Steve
but it takes <20 sec to display the 50000000 it cant possibly iterate them all in that time
root@ubuntu:~# time ./test.py
0500000000
real 0m13.115s
user 0m12.870s
sys 0m0.020s
also >> to a file oinly shows the 1 line
thats the dos batch file just finished :P
1.2GB text file compresses into a 13MB rar file.. wow.