[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grep . /; echo $?
From: |
Benno Schulenberg |
Subject: |
Re: grep . /; echo $? |
Date: |
Fri, 04 Nov 2005 23:16:58 +0100 |
User-agent: |
KMail/1.8.3 |
Julian Foad wrote:
> > bash$ src/grep asdf *
> > src/grep: autom4te.cache: Is a directory
> > src/grep: bootstrap: Is a directory
>
> Andreas Schwab wrote:
> > 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.
>
> Yes, that's true: the message could quite easily be extended or
> replaced, but is this really something that needs fixing?
No, it doesn't need fixing. But is there anything against making
the message a little clearer? And as these lines are now going to
get changed anyway, why not seize the opportunity? Why not
something like:
@@ -187,7 +187,7 @@
suppressible_error (char const *mesg, int errnum)
{
if (! suppress_errors)
- error (0, errnum, "%s", mesg);
+ error (0, errnum, "Cannot read %s", mesg);
errseen = 1;
}
> It's fairly obvious from its form that it's an error message.
Well, to an experienced user, certainly. But to a newcomer? Not to
me it wasn't. When I first did a 'grep sth *' and got those "Is a
directory" messages, I tought: "Yes, I know. What's wrong?"
> There's not much point in changing one program to be
> different from the others.
It's not really different, just more precise.
Benno
- Re: grep . /; echo $?, (continued)
- Re: grep . /; echo $?, Charles Levert, 2005/11/03
- Re: grep . /; echo $?, Andreas Schwab, 2005/11/03
- Re: grep . /; echo $?, Benno Schulenberg, 2005/11/04
- Re: grep . /; echo $?, Andreas Schwab, 2005/11/04
- Re: grep . /; echo $?, Julian Foad, 2005/11/04
- Re: grep . /; echo $?, Charles Levert, 2005/11/04
- Re: grep . /; echo $?, Julian Foad, 2005/11/08
- Exit statuses and errors messages (was Re: grep . /; echo $?), Charles Levert, 2005/11/08
- Re: Exit statuses and errors messages (was Re: grep . /; echo $?), Charles Levert, 2005/11/08
- Re: Exit statuses and errors messages (was Re: grep . /; echo $?), Julian Foad, 2005/11/09
- Re: grep . /; echo $?,
Benno Schulenberg <=
- Re: grep . /; echo $?, Charles Levert, 2005/11/04
- Re: grep . /; echo $?, Julian Foad, 2005/11/04
Re: grep . /; echo $?, Aharon Robbins, 2005/11/09