bugfindutils - Bugs: bug #30772, Erroneous results while using...

 
 

bug #30772: Erroneous results while using printf on a name query

Submitted by:  Bake Timmons <bt3>
Submitted on:  Fri 13 Aug 2010 10:25:54 PM UTC  
 
Category: findSeverity: 3 - Normal
Item Group: Wrong resultStatus: Invalid
Privacy: PublicAssigned to: None
Originator Name: Bake TimmonsOpen/Closed: Closed
Release: 4.4.2Fixed Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 14 Aug 2010 03:59:35 AM UTC, comment #2:

Oh, thanks. Sorry for the false alarm.

Bake Timmons <bt3>
Fri 13 Aug 2010 10:40:22 PM UTC, comment #1:

Not a bug in find, but in your expression.

Try:

find \( -name '.[!.]' -o -name '[!.]' \) -printf '%f\n'

to see the difference of order of precedence.

Eric Blake <ericb>
Project Administrator
Fri 13 Aug 2010 10:25:54 PM UTC, original submission:

To reproduce, try

$ mkdir -p a/{b,.c,.de}
$ find -name '.[!.]' -o -name '[!.]' -printf '%f\n'
b

Yet, we have
$ find -name '.[!.]' -o -name '[!.]'
./b
./.c
./.de

Although I have since realized that '-not -name .' is the right way to solve my original problem (instead of the options with the glob patterns), the first find command above does indeed show a bug.

Thanks.

Bake Timmons <bt3>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by ericb (Posted a comment)
  • -unavailable- added by bt3 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 13 Aug 2010 10:40:22 PM UTCericbStatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1