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

 
 

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

Submitter:  Bake Timmons <bt3>
Submitted:  Fri 13 Aug 2010 10:25:54 PM UTC
   
 
Category:  find Severity:  3 - Normal
Item Group:  Wrong result Status:  Invalid
Privacy:  Public Assigned to:  None
Originator Name:  Bake Timmons Open/Closed:  Closed
Release:  4.4.2 Fixed Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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 Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-08-13 ericb StatusNone Invalid
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code