bug-grep
[Top][All Lists]
Advanced

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

Re: grep . /; echo $?


From: Andreas Schwab
Subject: Re: grep . /; echo $?
Date: Fri, 04 Nov 2005 17:25:03 +0100
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux)

Benno Schulenberg <address@hidden> writes:

> Andreas Schwab wrote:
>> Benno Schulenberg <address@hidden> writes:
>> > (The message itself is a bit strange though: it doesn't sound
>> > like an error.  "Cannot read a directory" would be better.)
>>
>> The message is just what strerror(EISDIR) returns, which has no
>> information about the actual operation that failed.
>
> But grep has this information: it knows what it was trying to do, so 
> it could replace the standard message with something more specific.

All it would need to do is add some descriptive comment, like "cannot read
%s:", where %s substitutes the file name, before the errno text.

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

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