This is the mail archive of the
mailing list for the Cygwin project.
Re: Wildcard problem with recursion
Corinna Vinschen wrote:
On Thu, Oct 23, 2003 at 03:05:53PM +0530, Ajith Kumar wrote:Thanks for the xargs tip Corinna - thats a new one on me.
Cygwin utilities like grep or ls with -R options doesn't seem to be working.
egs when I say
grep -r FLD_DCT_STRING *.h??
grep: *.hpp: No such file or directory
However there are many .h, .hxx and .hpp files in the subdirectories
ls also gives the same err.
Yes, read the shell man pages to learn how file completion works.
What you want is a job for `find | xargs grep'.
an alternative (talking to original poster here) is:
grep FLD_DCT_STRING `find . -name '*.h??'`
Or you can search *directories* recursively with grep, but this doesn't
allow you to filter the file type. e.g.:
grep -r FLD_DCT_STRING .
where '.' is the current directory - this will search all files in
subdirectories too. See 'info grep'.
Andy Rushton, Research Fellow, School of ECS, Southampton University
address: rm 3053, Mountbatten Building (53)
phone: 023 8059 6665
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html