Re: Calling cygpath from find exec?

2015-12-01 Thread Duncan Roe
On Mon, Nov 23, 2015 at 02:23:33PM -0700, Eric Blake wrote: > On 11/23/2015 01:45 PM, Matt D. wrote: > > Is there a reason why these produce different results? > > > > find . -exec cygpath -wa {} \; > > find . -exec echo $(cygpath -wa {}) \; > > Incorrect quoting. You are invoking: > > find .

Re: Calling cygpath from find exec?

2015-12-01 Thread Eric Blake
On 12/01/2015 01:43 PM, Duncan Roe wrote: >> Why not just: >> >> find . -exec cygpath -wa {} + >> >> since cygpath handles more than one file in an invocation (that is, >> using '-exec {} +' rather than '-exec {} \;' is generally faster). >> > I would be using xargs. Especially under /cygdrive,

Calling cygpath from find exec?

2015-11-23 Thread Matt D.
Is there a reason why these produce different results? find . -exec cygpath -wa {} \; find . -exec echo $(cygpath -wa {}) \; I have to do this which is much slower: find . -exec bash -c 'echo $(cygpath -wa {})' \; Or this: find . | while read a; do echo $(cygpath -wa $a); done Matt D. --

RE: Calling cygpath from find exec?

2015-11-23 Thread Nellis, Kenneth
From: Matt D. > > Is there a reason why these produce different results? > > find . -exec cygpath -wa {} \; > find . -exec echo $(cygpath -wa {}) \; > > I have to do this which is much slower: > find . -exec bash -c 'echo $(cygpath -wa {})' \; > > Or this: > find . | while read a; do echo

Re: Calling cygpath from find exec?

2015-11-23 Thread Eric Blake
On 11/23/2015 01:45 PM, Matt D. wrote: > Is there a reason why these produce different results? > > find . -exec cygpath -wa {} \; > find . -exec echo $(cygpath -wa {}) \; Incorrect quoting. You are invoking: find . -exec echo c:\cygwin\home\you\{} \; (or whatever ./{} resolves to), instead