This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: problem with find/grep

Another issue I've run into with find, but typically when I pipe
it to xargs is that directories/files with spaces in the names cause
all kind of disruption.

On Tue, 12 Oct 2004 12:25:15 -0400 (EDT), Igor Pechtchanski wrote:

>On Tue, 12 Oct 2004, Daniel Miller wrote:

>> On linux systems, I typically to global searches with a command such as:
>>     	find . -name "*.[ch]*" -exec grep -H -n stuff {} \;
>> and this works nicely.  However, when I try the same command under Cygwin
>> (from a 4NT prompt, not Bash), I get "find: missing argument to '-exec' ".
>> I tried a variety of modifications to the command but nothing makes this
>> work.  What am I missing??

>I'd bet it's the fact that 4NT uses different quoting mechanisms than
>bash.  Try quoting the semicolon as ";" instead of \;.  You may also need
>to quote the braces.  CGF uses 4NT, AFAIK, so he could probably provide
>better hints.  I won't ask the implied "Why not use bash?" question...
>	Igor
>      |\      _,,,---,,_
>ZZZzz /,`.-'`'    -.  ;-;;,_
>     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
>    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

>"Happiness lies in being privileged to work hard for long hours in doing
>whatever you think is worth doing."  -- Dr. Jubal Harshaw

>Unsubscribe info:
>Problem reports:

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]