bugfindutils - Bugs: bug #21373, [Feature req] Option to manipulate...

 
 

bug #21373: [Feature req] Option to manipulate paths before {} expansion.

Submitted by:  None
Submitted on:  Fri 19 Oct 2007 09:39:22 AM UTC  
 
Category:  find Severity:  1 - Wish
Item Group:  None Status:  Works For Me
Privacy:  Public Assigned to:  James Youngman <jay>
Originator Name:  Peter Mogensen Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  4.2.27
Fixed Release:  None

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

Sat 24 Nov 2007 11:23:42 AM UTC, comment #2: 

Peter writes:

However.... I found out that find actually supports this via -printf, so
please close the feature request.

find lib/perl/ -name '*.pm' -printf "%P\n" | xargs -l1

Does what I want. Sorry for the inconvenience.

So, closing...

James Youngman <jay>
Project AdministratorIn charge of this item.
Sat 17 Nov 2007 11:20:05 AM UTC, comment #1: 

Why not just use
find ./lib -name '*.pm' -print0 |
 perl -0ne 's/([^\/]*\/){2}//; print;' |
 xargs -r0 ...

James Youngman <jay>
Project AdministratorIn charge of this item.
Fri 19 Oct 2007 09:39:22 AM UTC, original submission:  

When using -exec {}, find replaces {} with either an absolute path or a path relative to the current directory. Some times you need a path relative to the subdirectory you're searching in.
Example:

Your say
find ./lib -name '*.pm' -exec ... {} \;

And you need {} to expand to:
Text/Glyffer.pm
XML/Paffer.pm

And not to:
./lib/Text/Glyffer.pm
./lib/XML/Paffer.pm

An option like the -p for the patch program to control {} expansion would be nice.

Anonymous

 

(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 None (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-11-24 jay Severity3 - Normal => 1 - Wish
        StatusNone => Works For Me
        Assigned toNone => jay
        Open/ClosedOpen => Closed

    Back to the top


    Powered by Savane 3.5