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: findSeverity: 2 - Minor
Item Group: Wrong resultStatus: Invalid
Privacy: PublicAssigned to: James Youngman <jay>
Originator Name: Open/Closed: Closed
Release: 4.2.28Fixed 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:

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 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 jay (Posted a comment)
  • -unavailable- added by andy99 (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 07 Jan 2007 07:58:32 PM UTCjayOpen/ClosedOpen=>Closed
    Fri 01 Dec 2006 12:40:40 PM UTCjaySeverity3 - Normal=>2 - Minor
      Item GroupNone=>Wrong result
      StatusNone=>Invalid
      Assigned toNone=>jay

    Back to the top


    Powered by Savane 3.1-cleanup1