Linux.com

Re:Jem "doesn't see the usefulness"?

Posted by: Anonymous Coward on October 21, 2005 12:07 PM
Here's a quick and dirty way to view a random man page:
<tt>import glob, os, random
section = random.choice(glob.glob('/usr/share/man/man*'))
<nobr>p<wbr></nobr> age = random.choice(glob.glob(section + '/*'))
title = os.path.split(page)[1][:-5]
n = os.path.split(page)[1][-4:-3]
os.system('man %s %s' % (n, title))</tt>
(tested on Debian Sarge, ugly, inefficient)

#

Return to Review: <em>Linux in a Nutshell</em>