I agree that you don't want grep to ignore pipes and I know about the
find workaround, but I still think the fact that two pipes exist by
default in /etc is a bug:
# ls -ld /etc/*pipe*
prw------- 1 root root 0 May 22 14:17 /etc/initpipe
prw------- 1 root root 0 May 22 18:19 /etc/utmppipe
If you want to find something in your config files on almost any
GNU/Linux distribution or BSD or OSX, you can do this:
grep foo /etc/*
But this hangs on every *Solaris distribution since Solaris 2.6. I'd
call that a bug and an approachability issue. A related bug was closed
in Solaris 9 when this feature was finally documented. I logged bug
6437243 against this in OpenSolaris but it wasn't given a very high
priority.
Unfortunately, I suspect 6437243 is an example of a bug which will be
very difficult to fix without breaking compatibility with something
which relies on those pipes being in /etc. I haven't yet encountered
any Linux distributions which don't have examples of bad design which
would be even more difficult to fix without breaking something.
Joerg Schilling wrote:
Brian Nitz <[EMAIL PROTECTED]> wrote:
Depending on what his find did, Chris may have encountered a bug. Find
/ or /etc -exec grep foo {} \; can hang on some versions of Solaris
because it encounters a named pipe and gets stuck grepping the pipe
forever.
What you describe is not a bug but inapropriate usage.
It would be a bad idea to let grep ignore pipes.
If you don't like grep to hang on pipes, just use:
find /etc -type f -exec grep foo {} +
Jörg
_______________________________________________
opensolaris-discuss mailing list
[email protected]