1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
# generate query file, $1=number $2=filename.
cat >makeqs.c <<EOF
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char** argv) {
int i;
int max = atoi(argv[1]);
for(i=0; i<max; i++)
printf("a%8.8d.example.com IN A\n", i);
return 0;
}
EOF
gcc -o makeqs makeqs.c
#function makeqs() {
#i=0
#echo "; generated by makeqs" > $2
#while test $i -lt $1; do
#echo "a$i.example.com IN A" >> $2
#i=`expr $i + 1`
#done
#}
./makeqs 10 > q10.txt
cat q10.txt
./makeqs 100 > q100.txt
./makeqs 1000 > q1000.txt
./makeqs 10000 > q10000.txt
./makeqs 100000 > q100000.txt
#./makeqs 1000000 > q1000000.txt
#./makeqs 10000000 > q10000000.txt
|