File: makeqs.sh

package info (click to toggle)
unbound 1.24.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 31,436 kB
  • sloc: ansic: 138,476; sh: 6,860; yacc: 4,259; python: 1,950; makefile: 1,881; awk: 162; perl: 158; xml: 36
file content (33 lines) | stat: -rw-r--r-- 647 bytes parent folder | download | duplicates (7)
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