#!/usr/local/bin/perl # # straycats -- find catpages with no parent manpage source for $root (split(/:/, shift || $ENV{MANPATH} || '/usr/man')) { chdir($root) || die "can't chdir to $root: $!\n"; foreach $catdir ( ) { unless (opendir (CATDIR, $catdir)) { warn("can't opendir $catdir: $!"); next; } ($mandir = $catdir) =~ s/cat/man/; foreach $file ( readdir(CATDIR) ) { print "no man page for $root/$catdir/$file\n" unless -e "$mandir/$file"; } } }