File: extractdoc

package info (click to toggle)
chiark-tcl 1.3.7
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 592 kB
  • sloc: ansic: 4,542; perl: 415; makefile: 129; tcl: 106; sh: 38
file content (14 lines) | stat: -rw-r--r-- 312 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/perl -w
$o= '';
for (;;) {
    exit 0 unless defined ($_= <STDIN>);
    $o .= $_;
    last if / \-\-\-8\<\-\-\- end of documentation /;
}
($before, $_, $after)= @ARGV;
s,.*/,,;
$of= $before.$_.$after;
open F, "> $of" or die $!;
print F $o or die $!;
close F or die $!;
print " wrote $of\n" or die $!;