]> andersk Git - libfaim.git/blame - utils/docs/split-man.pl
- Fri Nov 10 08:24:34 UTC 2000
[libfaim.git] / utils / docs / split-man.pl
CommitLineData
be67fdd0 1#!/usr/bin/perl
2
3if ($#ARGV < 0) {
4 die "where do I put the results?\n";
5}
6
7mkdir $ARGV[0],0777 or die "Can't create $ARGV[0]: $!\n";
8$state = 0;
9while (<STDIN>) {
10 if (/^\.TH \"[^\"]*\" 3 \"([^\"]*)\"/) {
11 if ($state == 1) { close OUT }
12 $state = 1;
13 $fn = "$ARGV[0]/$1.3";
14 print STDERR "Creating $fn\n";
15 open OUT, ">$fn" or die "can't open $fn: $!\n";
16 print OUT $_;
17 } elsif ($state != 0) {
18 print OUT $_;
19 }
20}
21
22close OUT;
23
This page took 0.051418 seconds and 5 git commands to generate.