grep -i foobar ./*/*.c
works in bash.
--- Alan Dayley <
adayley@adtron.com> wrote:
> Setup:
> -Directory tree
> top
> |--sub1
> |--sub2
> \--sub3
> -Each of the subX directories have *.c files in them.
> -The top directory does NOT have any *.c files in it.
> -I am currently in the top directory.
>
> Goal:
> -Find the string "foobar" every place that it occurs in the *.c files
> in
> all of the subX directories.
>
> Command and result:
> [adayley@locatlhost top]$ grep -ir foobar *.c
> grep: *.c: No such file or directory
> [adayley@locatlhost top]$
>
> Question:
> I gave the 'r' option for a recursive search and I know that the subX
>
> diretories have *.c files. But, grep appearently does not decend
> into
> the subX directories because the top directory has no *.c files. How
> do
> I make it search the subX directories anyway?
>
> Alan
>
>
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change you mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com