I think I would do it more like:
find /bin/ /usr/bin/ /sbin/ /usr/sbin/ -executable -type f -exec whatis "$(basename {})" \; | sort -u > commands.txt