2011-07-06 05:05:52 +00:00
|
|
|
#!/usr/bin/perl
|
2021-06-03 08:37:05 +02:00
|
|
|
|
2011-07-06 05:05:52 +00:00
|
|
|
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
2012-06-29 11:39:47 +10:00
|
|
|
#
|
2011-07-06 05:05:52 +00:00
|
|
|
# SPDX-License-Identifier: MPL-2.0
|
2021-06-03 08:37:05 +02:00
|
|
|
#
|
2011-07-06 05:05:52 +00:00
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
2018-02-23 09:53:12 +01:00
|
|
|
#
|
2011-07-06 05:05:52 +00:00
|
|
|
# See the COPYRIGHT file distributed with this work for additional
|
|
|
|
# information regarding copyright ownership.
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
|
2011-09-02 21:15:39 +00:00
|
|
|
die "Usage: makenames.pl <num> [<len>]" if (@ARGV == 0 || @ARGV > 2);
|
|
|
|
my $len = 10;
|
|
|
|
$len = @ARGV[1] if (@ARGV == 2);
|
2011-07-06 05:05:52 +00:00
|
|
|
|
|
|
|
my @chars = split("", "abcdefghijklmnopqrstuvwxyz123456789");
|
|
|
|
|
2023-06-07 16:00:00 +02:00
|
|
|
srand;
|
2011-07-06 05:05:52 +00:00
|
|
|
for (my $i = 0; $i < @ARGV[0]; $i++) {
|
|
|
|
my $name = "";
|
2011-09-02 21:15:39 +00:00
|
|
|
for (my $j = 0; $j < $len; $j++) {
|
2011-07-06 05:05:52 +00:00
|
|
|
my $r = rand 35;
|
|
|
|
$name .= $chars[$r];
|
|
|
|
}
|
|
|
|
print "$name" . ".example\n";
|
|
|
|
}
|