Created
July 1, 2015 23:23
-
-
Save brosenberg/bc2107c0e6b331706d72 to your computer and use it in GitHub Desktop.
This file contains 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 | |
P="" | |
for i in $(sed 's/:/ /g' <<<$PATH); do | |
P="$P $(find $i -maxdepth 1 -mindepth 1 -type f -executable -exec basename {} \;)" | |
done | |
man $(echo -e $(sed 's/ /\\n/g' <<<$P) | rl | tail -1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment