eudora-mac/Bits/makeindex

1 line
514 B
Plaintext
Raw Normal View History

2018-05-23 09:59:15 +00:00
#!/usr/local/bin/perl while (<>) { if (m=^/\*{30,}$=) {$takeit = 1;} # separator line elsif ($takeit) # last was separator { chop;split(' '); if ($_[0] eq "*") # yep, looks right { shift(@_); # strip off * $fn = shift(@_); # grab fn name $ind{$fn} = sprintf("%4d %s",$.,"$ARGV " . join(" ",@_)); } $takeit = 0; # next line isn't special } if (eof) {close(ARGV);} # reset $. } # output foreach $k (sort keys ind) { printf "%-24s %s\n",$k,$ind{$k}; }