mirror of
https://github.com/Hamlib/Hamlib.git
synced 2024-09-22 19:07:22 +00:00
f564337994
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@229 7ae35d74-ebe9-4afe-98af-79ac388436b8
23 lines
490 B
Perl
Executable File
23 lines
490 B
Perl
Executable File
#!/usr/bin/perl
|
|
|
|
if ($#ARGV < 0) {
|
|
die "where do I put the results?\n";
|
|
}
|
|
|
|
# mkdir $ARGV[0],0777 or die "Can't create $ARGV[0]: $!\n";
|
|
$state = 0;
|
|
while (<STDIN>) {
|
|
if (/^\.TH \"[^\"]*\" 4 \"([^\"]*)\"/) {
|
|
if ($state == 1) { close OUT }
|
|
$state = 1;
|
|
$fn = "$ARGV[0]/$1.4";
|
|
print STDERR "Creating $fn\n";
|
|
open OUT, ">$fn" or die "can't open $fn: $!\n";
|
|
print OUT $_;
|
|
} elsif ($state != 0) {
|
|
print OUT $_;
|
|
}
|
|
}
|
|
|
|
close OUT;
|