Originally Posted by hchoonbeng
Hi I need to test my prog with all possible combination of 13 digits hexadecimal and later consolidation the all results in txt format into one txt report. how to do it using scipt? eg.
for( i in 0x0000000000000 to 0xFFFF.FFFF.FFFF.F)
Bash is not very good at maths, however, you can always do something like this:
for ((i=0;i<=255;i++)); do printf "%.2X\n" $i; done
You get the idea. You can save that result in a variable and pass it to your program:
j=printf "%.2X\n" $i
I don't know of a way to use hex on the loop control, however that shouldn't be a problem if you know the starting and ending numbers.
Anyway, are you sure that you want to loop 2^(4*13) times using bash? That will take quite a bit of time and cpu power...