summaryrefslogtreecommitdiffstats
path: root/make_nic_handles.pl
blob: 7c7fb68bdb4a47fc4ee6395f78930a4347c8a284 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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|;
}