diff --git a/util/extract-names.pl b/util/extract-names.pl new file mode 100644 index 0000000000..d413a045cc --- /dev/null +++ b/util/extract-names.pl @@ -0,0 +1,22 @@ +#!/usr/bin/perl + +$/ = ""; # Eat a paragraph at once. +while() { + chop; + s/\n/ /gm; + if (/^=head1 /) { + $name = 0; + } elsif ($name) { + if (/ - /) { + s/ - .*//; + s/[ \t,]+/ /g; + push @words, split ' '; + } + } + if (/^=head1 *NAME *$/) { + $name = 1; + } +} + +print join("\n", @words),"\n"; +