[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grep patch
From: |
Alain Magloire |
Subject: |
Re: grep patch |
Date: |
Fri, 18 Jan 2002 09:27:22 -0500 (EST) |
>
> On Thu, Jan 17, 2002 at 03:47:08PM -0800, Paul Eggert wrote:
> > > > grep -h pattern | sed "s,^,$fn:,"
> > >
> > > It works bad when I use grep with options such as -C
...
> > > > grep -r is used often enough that it's reasonable to have as an
> > > > option, both for convenience and performance.
> > >
> > > This options used often because grep has it.
> >
> > No, you've got it backwards. grep didn't have -r for many years, but
> > many ordinary users kept asking for it, so it got added to grep. As
> > far as I know you are the only one who's ever asked for anything like
> > --fake-filename.
>
> You should answer them -- use find. grep with option -r cannot do a lot
> of things, that find + grep can, for instance, I often do something
> like:
> find . -name '*.h' | xargs grep -w uint32_t
>
> find intended for finding files, grep -- for grepping them :-)
grep --include=*.h -r uint32_t .
--include --exclude as been part of 2.5e(should in 2.5f) for sometimes.
They were not meant to replace find, but rather a quicker way to
express this particular idiom.
- Re: grep patch, (continued)
- Re: grep patch, Andreas Schwab, 2002/01/17
- Re: grep patch, Paul Eggert, 2002/01/17
- Re: grep patch, Stepan Koltsov, 2002/01/17
- Re: grep patch, Paul Eggert, 2002/01/17
- Re: grep patch, Stepan Koltsov, 2002/01/17
- Re: grep patch, Paul Eggert, 2002/01/17
- Re: grep patch, Miles Bader, 2002/01/17
- Re: grep patch, Paul Eggert, 2002/01/18
- Re: grep patch, Miles Bader, 2002/01/18
- Re: grep patch, Stepan Koltsov, 2002/01/18
- Re: grep patch,
Alain Magloire <=
- Message not available
- Re: grep patch, Stepan Koltsov, 2002/01/18
- Re: grep patch, Andreas Schwab, 2002/01/18
- Re: grep patch, Stepan Koltsov, 2002/01/19
- Re: grep patch, Miles Bader, 2002/01/19
- Re: grep patch, Stepan Koltsov, 2002/01/19
- Re: grep patch, Kris Warkentin, 2002/01/18
- Re: grep patch, Alain Magloire, 2002/01/17
Re: grep patch, Bernhard Rosenkraenzer, 2002/01/18
Re: grep patch, Paul Eggert, 2002/01/18