bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Allow `find` to use exported function for -exec*?


From: Eric Blake
Subject: Re: Allow `find` to use exported function for -exec*?
Date: Wed, 15 Apr 2015 22:23:07 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]