Posted By

kuonirat on 01/17/13


Tagged


Versions (?)

Print a random man page


 / Published in: Bash
 

Useful for a text screen saver if you want to learn sth instead of watching some pointless flickering stuff ;)

  1. ls /usr/share/man/man1 | sed 's/\([^\.]\+\).*/\1/' | awk 'BEGIN { srand() } { print rand() " " $0 }' | sort -n | awk '{ print $2 }' | head -n 1 | xargs -I{} man -P cat {}

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: esperanto on February 9, 2013

Nice idea. Much shorter:

find /usr/share/man/man1 | shuf -n1 | xargs man

You need to login to post a comment.