can grep use filenames from stdin?
Rogelio Serrano
rogelio.serrano at gmail.com
Sun Mar 18 17:51:30 UTC 2007
On 3/19/07, Thompson Harmon [US], Stanley W.
<Stanley.Harmon at sperry.ngc.com> wrote:
> find . -name \*.c
> grep -l -e somepattern `!!`
>
> The above commands will give you the names of the c files containing somepattern.
>
> Stan
>
>
> -----Original Message-----
> From: busybox-bounces at busybox.net <busybox-bounces at busybox.net>
> To: busybox at busybox.net <busybox at busybox.net>
> Sent: Sun Mar 18 04:06:36 2007
> Subject: can grep use filenames from stdin?
>
> can we make grep get filenames from stdin like:
>
> find . -name \*.c | grep -l -e somepattern
>
> -
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://busybox.net/cgi-bin/mailman/listinfo/busybox
>
>
yes but xargs will spawn grep for each file and grep will then compile
the pattern everytime.
maybe its better to use some sort of indexing scheme for insanely
humongous directories
--
the thing i like with my linux pc is that i can sum up my complaints in 5 items
More information about the busybox
mailing list