bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grep patch


From: Stepan Koltsov
Subject: Re: grep patch
Date: Thu, 17 Jan 2002 22:22:08 +0300
User-agent: Mutt/1.3.25i

On Thu, Jan 17, 2002 at 10:21:35AM -0800, Paul Eggert wrote:
> > This is diff, that add option --fake-filename= for grep 2.5f, it prints
> > specified filename instead of real.
> 
> Why not just use 'sed' on the output of 'grep'?  That's simpler.

No,
grep --fake-filename=$fn -H pattern
is simpler (easier to read) then
grep -H pattern | sed 's,(стандартный ввод)',$fn,
                          ^^^^^^^^^^^^^^^^ is Russian for "standart input" :-)

Maybe you are right, I forget about sed :-)

BTW I don't understand, for what purposes option --recursive presents
in grep, it is less handy option, then --fake-filename=, because I can
write
find * -type f | xargs grep -H ...
and in this case I also can specify filename pattern...

-- 
mailto:address@hidden
irc.openprojects.net/#debian-russian



reply via email to

[Prev in Thread] Current Thread [Next in Thread]