Skip to content

Instantly share code, notes, and snippets.

@pjones
Created August 10, 2012 21:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pjones/3318285 to your computer and use it in GitHub Desktop.
Save pjones/3318285 to your computer and use it in GitHub Desktop.
#!/bin/sh
whatisthere () {
for dir in `echo $PATH | sed 's/:/ /g'`; do
for file in $dir/*; do
base=`basename $file`
desc=`whatis $base 2>&1`
[ $? -eq 0 ] && echo $desc
done
done
}
whatisthere | sort | less -SR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment