LDP/LDP/guide/docbook/abs-guide/what.sh

21 lines
502 B
Bash
Raw Normal View History

2001-07-10 14:25:50 +00:00
#!/bin/bash
# What are all those mysterious binaries in /usr/X11R6/bin?
DIRECTORY="/usr/X11R6/bin"
# Try also "/bin", "/usr/bin", "/usr/local/bin", etc.
for file in $DIRECTORY/*
do
2001-09-04 13:27:31 +00:00
whatis `basename $file` # Echoes info about the binary.
2001-07-10 14:25:50 +00:00
done
exit 0
2005-03-21 13:51:11 +00:00
2011-08-29 23:59:19 +00:00
# Note: For this to work, you must create a "whatis" database
#+ with /usr/sbin/makewhatis.
# You may wish to redirect output of this script, like so:
# ./what.sh >>whatis.db
# or view it a page at a time on stdout,
# ./what.sh | less