aboutsummaryrefslogtreecommitdiffstats
path: root/docs/sigextract.pl
blob: cc6f8bb8729abe6c914270d461a8c2664884618a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env perl

use strict;
use warnings;

my $file = shift // 'allsigs.txt';

open my $fh, $file or die "couldn't open $file: $!";
my $sigs = {};

while (my $line = <$fh>) {
    chomp $line;
    if ($line =~ m/"(\w+(?:\s+\w+)*)"/) {
        #print "Found signal: $1\n";
        $sigs->{$1}++;
    }
}

close $fh;

my @signals = keys %$sigs;

print join("\n", sort @signals);
print "\n";