Help with either bash or find...

Bill Davidsen davidsen at tmr.com
Sat May 10 15:37:48 UTC 2008


Gordon Messmer wrote:
> Todd Zullinger wrote:
>> I think something similar with xargs would work too:
>>
>> find -name '*.mpc' -print0 | \
>>     xargs -0 -i mppdec "{}" "`echo {} | sed s/.mpc/.wav`"
>>   
> 
> No, because the section in backticks would be executed by the shell, 
> before xargs.
> 
> xargs can't be used to run anything with shell substitution.  It doesn't 
> call system().
> 
It's ugly to use substitution, but being pedantic you can use "bash -c 
cmd" and maybe "exec" to do what you want.

Note that I never actually *do* it that way, I'm just noting that if you 
insist on that solution it isn't impossible, just ugly.

-- 
Bill Davidsen <davidsen at tmr.com>
   "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot




More information about the fedora-list mailing list