由于只有外壳程序知道如何运行外壳程序功能,因此您必须运行外壳程序才能运行功能。您还需要用标记要导出的函数
export-f,否则子shell将不会继承它们:
export -f dosomethingfind . -exec bash -c 'dosomething "$0"' {} ;
由于只有外壳程序知道如何运行外壳程序功能,因此您必须运行外壳程序才能运行功能。您还需要用标记要导出的函数
export-f,否则子shell将不会继承它们:
export -f dosomethingfind . -exec bash -c 'dosomething "$0"' {} ;