| 1 | #!/bin/bash |
| 2 | |
| 3 | # What are all those mysterious binaries in /usr/X11R6/bin? |
| 4 | |
| 5 | DIRECTORY="/usr/X11R6/bin" |
| 6 | # Try also "/bin", "/usr/bin", "/usr/local/bin", etc. |
| 7 | |
| 8 | for file in $DIRECTORY/* |
| 9 | do |
| 10 | whatis `basename $file` # Echoes info about the binary. |
| 11 | done |
| 12 | |
| 13 | exit 0 |
| 14 | |
| 15 | # Note: For this to work, you must create a "whatis" database |
| 16 | #+ with /usr/sbin/makewhatis. |
| 17 | # You may wish to redirect output of this script, like so: |
| 18 | # ./what.sh >>whatis.db |
| 19 | # or view it a page at a time on stdout, |
| 20 | # ./what.sh | less |