bugfindutils - Bugs: bug #18430, Problem with solving '{}' brackets


bug #18430: Problem with solving '{}' brackets

Submitted by:  Andrzej <andy99>
Submitted on:  Fri 01 Dec 2006 09:51:01 AM UTC  
Category:  find Severity:  2 - Minor
Item Group:  Wrong result Status:  Invalid
Privacy:  Public Assigned to:  James Youngman <jay>
Originator Name:  Open/Closed:  Closed
Release:  4.2.28 Fixed Release:  None

Add a New Comment (Rich Markup)

You are not logged in

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


Fri 01 Dec 2006 12:40:40 PM UTC, comment #1: 

I think you have misunderstood how shell redicrection works.  The text after the ">" is interpreted by the shell, not by find.  That means that "{}.tmp" means whatever it means to the shell, and find has no say in expanding it.

That means this is not a bug in find (or, for that matter, in the shell).

While "-exec sh ..."  would change this behaviour, don't do that as it is very insecure.

James Youngman <jay>
Project AdministratorIn charge of this item.
Fri 01 Dec 2006 09:51:01 AM UTC, original submission:  


I think there is a problem with solving {} brackets to files name after ">" char is used ...

andy@andrzejwi:~/poligon$ ls
kuku1  kuku2

andy@andrzejwi:~/poligon$ find . -name "kuku*" -exec file {} > {}.tmp \;

andy@andrzejwi:~/poligon$ ls
kuku1  kuku2  {}.tmp

If you need more information about my system or software please feel free ...


Andrzej <andy99>


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

Attach Files:

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 jay (Posted a comment)
  • -email is unavailable- added by andy99 (Submitted the item)

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

    Only logged-in users can vote.




    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-01-07 jay Open/ClosedOpen => Closed
    2006-12-01 jay Severity3 - Normal => 2 - Minor
        Item GroupNone => Wrong result
        StatusNone => Invalid
        Assigned toNone => jay

    Back to the top

    Powered by Savane 3.5