summaryrefslogtreecommitdiffstats
path: root/tools/2isdndb.pm
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2000-11-08 00:01:16 +0000
committerMystery Man <unknown@mandriva.org>2000-11-08 00:01:16 +0000
commitd5c526273db473a7d87a26000585900fc10dda7d (patch)
tree0fdaabe7a00921b6cc556601b103d344fc7ac781 /tools/2isdndb.pm
parent9c164312d4bfff6d93e1c4529de6b992f2bebc44 (diff)
downloaddrakx-backup-do-not-use-d5c526273db473a7d87a26000585900fc10dda7d.tar
drakx-backup-do-not-use-d5c526273db473a7d87a26000585900fc10dda7d.tar.gz
drakx-backup-do-not-use-d5c526273db473a7d87a26000585900fc10dda7d.tar.bz2
drakx-backup-do-not-use-d5c526273db473a7d87a26000585900fc10dda7d.tar.xz
drakx-backup-do-not-use-d5c526273db473a7d87a26000585900fc10dda7d.zip
This commit was manufactured by cvs2svn to create branch
'unlabeled-1.1.1'.
Diffstat (limited to 'tools/2isdndb.pm')
-rw-r--r--tools/2isdndb.pm23
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/2isdndb.pm b/tools/2isdndb.pm
new file mode 100644
index 000000000..4b0f9d8f7
--- /dev/null
+++ b/tools/2isdndb.pm
@@ -0,0 +1,23 @@
+open F, "isdndb.txt" or die "file $file not found";
+open G, ">tutu" or die "file $file not found";
+foreach (<F>) {
+ s/\#.*//;
+ s/\[City\]\s+National//;
+ /\[Country\]\s*(.*)/ and $country = $1;
+ /\[City\]\s*(.*)/ and $city = $1;
+ /\[Name\]\s*(.*)/ and $name = $1;
+ /\[Prefix\]\s*(.*)/ and $prefix = $1;
+ /\[ISDN\]\s*(.*)/ and $isdn = $1;
+ /\[Domain\]\s*(.*)/ and $domain = $1;
+ /\[DNS\]\s*(.*)/ and ($dns1 ? $dns2 : $dns1) = $1;
+ if ($isdn && !$prefix) { $prefix = "" }
+ if (defined $name && defined $prefix && defined $isdn && defined $domain && defined $dns1 && defined $dns2) {
+ print G join("|", $country, $city, join("=>", $name, $prefix . $isdn, $domain, $dns1, $dns2)), "\n";
+ undef $name;
+ undef $prefix;
+ undef $isdn;
+ undef $domain;
+ undef $dns1;
+ undef $dns2;
+ }
+}