Bugzilla will be upgraded to version 5.0 on December 2, 2018. The outage period for the upgrade will start at 0:00 UTC and have a duration of 12 hours
Bug 121055 - find can't "-exec grep" with strings protected via braces
find can't "-exec grep" with strings protected via braces
Product: Fedora
Classification: Fedora
Component: findutils (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2004-04-16 10:48 EDT by Tom Wood
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-04-16 11:10:10 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tom Wood 2004-04-16 10:48:11 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031202

Description of problem:
While trying to figure out how FC handles zeroconf networking, I
stumbled on a bug whereby a combination of "find" and "-exec grep"
don't work well together.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. cd /etc/sysconfig
2. find . -type f -exec egrep -i zeroconf {} \; -print
3. Watch as nothing is returned.
4. cd /etc/sysconfig/network-scripts
5. egrep -i zeroconf *
6. Watch as several hits are displayed.

Actual Results:  find with -exec egrep didn't return any hits.

Expected Results:  find with -exec egrep should have returned hits.

Additional info:  This seems to happen with text that's somehow
escaped.  The above example should have returned a line with
"{ZEROCONF}" in it.  The curly braces may be interfering somehow.
Comment 1 Tim Waugh 2004-04-16 11:10:10 EDT
None of the *files* in /etc/sysconfig contain that string.  There is a
*symlink* to a file (outside that directory) that does..

So perhaps you meant:

find /etc/sysconfig -type f -o -type l -exec egrep -qi zeroconf \{} \;
Comment 2 Tom Wood 2004-04-16 12:31:53 EDT
Thank you.  I thought -f would follow symlinks.  Sorry for the stupidity.

Note You need to log in before you can comment on or make changes to this bug.