etc/services - sync with NetBSD-8
[minix.git] / external / bsd / bind / dist / bin / tests / startperf / makenames.pl
blob5eeb85151ac9ea35c15c720c4124d754f2682cf3
1 #!/usr/bin/perl
3 # Copyright (C) 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
5 # Permission to use, copy, modify, and/or distribute this software for any
6 # purpose with or without fee is hereby granted, provided that the above
7 # copyright notice and this permission notice appear in all copies.
9 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 # PERFORMANCE OF THIS SOFTWARE.
17 # Id: makenames.pl,v 1.3 2011/09/02 21:15:35 each Exp
18 use strict;
20 die "Usage: makenames.pl <num> [<len>]" if (@ARGV == 0 || @ARGV > 2);
21 my $len = 10;
22 $len = @ARGV[1] if (@ARGV == 2);
24 my @chars = split("", "abcdefghijklmnopqrstuvwxyz123456789");
26 srand;
27 for (my $i = 0; $i < @ARGV[0]; $i++) {
28 my $name = "";
29 for (my $j = 0; $j < $len; $j++) {
30 my $r = rand 35;
31 $name .= $chars[$r];
33 print "$name" . ".example\n";