Last active
December 22, 2016 01:44
-
-
Save adamryman/c3ceababa26916630d9a0716b9c96ae1 to your computer and use it in GitHub Desktop.
Gives you a random man page of one of the executables in your path
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# randman, gives you a random man page from your path | |
# Copy the line below to your .bashrc to add a simple alias | |
# alias randman="until for binpath in ${PATH//:/$' '}; do ls ${binpath}; done | shuf | head -1 | xargs man; do :; done" | |
until | |
for binpath in ${PATH//:/$' '}; do | |
ls ${binpath}; | |
done | shuf | head -1| xargs man; | |
do :; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment