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

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

Re: grep patch


From: Paul Eggert
Subject: Re: grep patch
Date: Thu, 17 Jan 2002 23:08:54 -0800 (PST)

> Date: Thu, 17 Jan 2002 23:03:48 -0500 (EST)
> From: "Alain Magloire" <address@hidden>

> it can be of some use for things like
> 
> # cat /etc/passwd | grep root - *.html
> (standard input):operator:x:11:0:operator:/root:
> ....
> 
> # cat /etc/passwd | grep --fake-filename=/etc/passwd root - *.html
> /etc/passwd:operator:x:11:0:operator:/root:

That's not a persuasive example, as

# grep root /etc/passwd *.html

does what you want and is obviously cleaner than the --fake-filename
approach.  I guess I'd have to see a real example to see what people
are driving at.


> The problem is for multiple argument files.  In this case the name
> of the option should make it clear that it is only for stdin.

Hmm, that wasn't clear to me, and still isn't.  Sorry, I guess I'm not
getting the motivation.

How about if we change grep to output "-:" instead of "(standard
input):"?  That might address some of the issue here.  It would be
less ambiguous, and it would easier to program with in i18n
environments.



reply via email to

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