Bug 121055 - find can't "-exec grep" with strings protected via braces
Summary: find can't "-exec grep" with strings protected via braces
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: findutils   
(Show other bugs)
Version: 1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Mike McLean
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-04-16 14:48 UTC by Tom Wood
Modified: 2007-11-30 22:10 UTC (History)
0 users

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


Attachments (Terms of Use)

Description Tom Wood 2004-04-16 14:48:11 UTC
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):
findutils-4.1.7-17

How reproducible:
Always

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 15:10:10 UTC
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 \{} \;
-print

Comment 2 Tom Wood 2004-04-16 16:31:53 UTC
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.