home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
InfoMagic Source Code 1993 July
/
THE_SOURCE_CODE_CD_ROM.iso
/
languages
/
perl
/
scripts-convex
/
man.shar
/
man
/
countman
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1991-03-04
|
326 b
|
12 lines
#!/usr/local/bin/perl
#
# countman -- count the number of entries in a man tree
$| = 1;
for (split(/:/, shift || $ENV{'MANPATH'} || '/usr/man')) {
dbmopen(%whatis, "$_/whatis", undef) || (warn "$0: dbmopen $_: $!\n",next);
print $_, ': ';
for ($count = 0; each %whatis; $count++) { }
print $count, "\n";
}