[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Grep --directories option
From: |
Paul Eggert |
Subject: |
Re: Grep --directories option |
Date: |
Sun, 1 Jun 2003 16:38:49 -0700 (PDT) |
> From: "Alfred M. Szmidt" <address@hidden>
> CC: address@hidden, address@hidden, address@hidden, address@hidden,
> address@hidden, address@hidden, address@hidden
> Date: Sat, 31 May 2003 12:55:51 +0200
>
> OK, how about this solution instead?
>
> Whats wrong with reverting the behaviour to the way it was before,
> that is in 2.4.x? Try to open the directory as a file, if that works
> continue, if it doesn't print an error message.
As I understand it, that's roughly what I'm proposing, except that I'm
suggesting that the diagnostic for the troublesome case be changed.
grep 2.4.2 reported something like this:
$ grep pattern dir
grep: dir: Is a directory
whereas I'm suggesting something more like this:
$ grep pattern dir
grep: dir: skipping unreadable directory
The point is that we're trying to improve the diagnostic so that
things are clearer to less-experienced users.
Perhaps a better message could be suggested, since the directory's
read-permission is normally enable, so in some sense the directory is
readable -- you just can't apply 'read()' to it. Perhaps something
like this instead?
$ grep pattern dir
grep: dir: directory cannot be read as a file
- Re: Grep --directories option,
Paul Eggert <=