summaryrefslogtreecommitdiffstats
path: root/make_nic_handles.pl
diff options
context:
space:
mode:
Diffstat (limited to 'make_nic_handles.pl')
-rwxr-xr-xmake_nic_handles.pl18
1 files changed, 18 insertions, 0 deletions
diff --git a/make_nic_handles.pl b/make_nic_handles.pl
new file mode 100755
index 0000000..7c7fb68
--- /dev/null
+++ b/make_nic_handles.pl
@@ -0,0 +1,18 @@
+#!/usr/bin/perl
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+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|;
+}
+