find /bin/ /usr/bin/ /sbin/ /usr/sbin/ -executable -type f -exec whatis "$(basename {})" \; | sort -u > commands.txtIt won't work with single quotes because `find` won't do that interpolation when it processes the `-exec` arguments; `whatis` ends up receiving a string with a literal dollar sign etc.
I think the kind of interpolation I originally had in mind isn't possible with `find`. Thankfully it apparently isn't needed (at least with my local `whatis`).