On 04/15/2015 08:50 PM, Peng Yu wrote: > Hi, It seems that it might be convenient to allow `find` to use > exported functions from shell for -exec*? Can this feature be added in > the future?
If your shell supports function exports, then the feature already exists. Merely export the function before invoking find, and make sure that the -exec action of find invokes the same shell that knows how to use those exported functions in the environment. And be careful of the bash shellshock bug. But there's nothing that can be added directly to find to change the situation. Function exports is a property of the shell, not of find. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature