2017-02-25 14:14:35 +00:00
|
|
|
#!/usr/bin/perl
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
|
|
|
|
open(my $in, '<', 'crypt.ind');
|
|
|
|
open(my $out, '>', 'crypt.ind.tmp');
|
|
|
|
my $a = <$in>;
|
|
|
|
print {$out} "$a\n\\addcontentsline{toc}{chapter}{Index}\n";
|
|
|
|
while (<$in>) {
|
|
|
|
print {$out} $_;
|
2006-11-17 14:21:24 +00:00
|
|
|
}
|
2017-02-25 14:14:35 +00:00
|
|
|
close $out;
|
|
|
|
close $in;
|
2006-11-17 14:21:24 +00:00
|
|
|
system("mv -f crypt.ind.tmp crypt.ind");
|
|
|
|
|