[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Grep --directories option
From: |
Marcus Brinkmann |
Subject: |
Re: Grep --directories option |
Date: |
Fri, 30 May 2003 13:19:35 +0200 |
User-agent: |
Mutt/1.5.4i |
Hi,
the issue is not so much about grepping through the content of a "real"
directory. As the directory content is binary encoded, that is almost never
useful.
I don't mind having skip behaviour on systems like GNU/Linux where
directories always really are directories (if that statement is even true).
In the Hurd, a directory might be a conventional directory. However, it
might also be a strange non-standard thingie. That thingie could allow
directory operations on it like a conventional directory. However it could
also allow file operations on it like a conventional file. For example, an
XML file could be accessed simply by "emacs foo.xml", but it could at the
same time implement a directory hierarchy for "ls foo.xml" that represents
the structure of the XML content.
I think that on the GNU/Hurd, the read behaviour is more favorable. It allows
for scenarios like the above, without adding a lot of noise to greps output
in case you have a match with a directory content. On systems where opening
a directory always fails, the error output of grep tends to annoy me,
though. On such systems I would prefer skip to be the default behaviour.
How to differentiate these systems I don't know, maybe a "mkdir foo; cat foo"?
Or just using host_os
Thanks,
Marcus
--
`Rhubarb is no Egyptian god.' GNU http://www.gnu.org marcus@gnu.org
Marcus Brinkmann The Hurd http://www.gnu.org/software/hurd/
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de/