summaryrefslogtreecommitdiffstats
path: root/make_nic_handles.pl
diff options
context:
space:
mode:
Diffstat (limited to 'make_nic_handles.pl')
-rwxr-xr-xmake_nic_handles.pl17
1 files changed, 17 insertions, 0 deletions
diff --git a/make_nic_handles.pl b/make_nic_handles.pl
new file mode 100755
index 0000000..6b031c2
--- /dev/null
+++ b/make_nic_handles.pl
@@ -0,0 +1,17 @@
+#!/usr/bin/perl
+
+use warnings;
+use strict;
+
+while (<>) {
+ chomp;
+ s/#.*$//;
+ s/^\s+//; s/\s+$//;
+ next if /^$/;
+
+ die "format error: $_" if not
+ (my ($a, $b) = /^(-\w+)\s+([\w\d\.:-]+)$/);
+
+ print qq| "$a",\t"$b",\n|;
+}
+