can grep use filenames from stdin?
Rogelio Serrano
rogelio.serrano at gmail.com
Mon Mar 19 03:13:48 UTC 2007
On 3/19/07, Denis Vlasenko <vda.linux at googlemail.com> wrote:
> On Sunday 18 March 2007 20:32, Rogelio Serrano wrote:
> > On 3/19/07, Paul Fox <pgf at brightstareng.com> wrote:
> > > >
> > > > yes but xargs will spawn grep for each file and grep will then compile
> > > > the pattern everytime.
> > >
> > > no, that's wrong. part of the point of xargs is to run the
> > > command as few times as possible, while keeping the number of
> > > arguments to the command under the system's command-length limit.
> >
> > does busybox xargs do that?
>
> Do you really need mailing list to determine that?
>
> # echo /* | xargs echo
> /app /bin /bin.sv /boot /boot.conf /boot.shadow.conf /dev /etc /home /init /lib /mnt /proc /pub /root /sbin /sys /tmp /usr /var /wlan /wlan0 /wlan_adhoc
>
> --
> vda
>
thanks i just tried it myself.
i have always used "find transactions -type f -newer start -not -newer
end | xargs -i grep operation:reload {}" on my glibc box and
eventually i thought xargs behaves the same way when i use busybox
grep on my uclibc box without the "-i i" and "{}".
sorry about that.
--
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