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

 
 

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

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

Add a New Comment Rich Markup
   

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>
Group administrator
Fri 01 Dec 2006 09:51:01 AM UTC, original submission:  

Hello

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 ...

Regards
--
AndY


Andrzej <andy99>

 

(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 jay (Posted a comment)
  • -email is unavailable- added by andy99 (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 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.13-cf05.
    Corresponding source code