Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Need to change, oh, every file at once?

by ariels (Curate)
on Jan 22, 2002 at 12:49 UTC ( [id://140620]=note: print w/replies, xml ) Need Help??


in reply to Need to change, oh, every file at once?

This way of using `find' is inefficient: it spawns a new Perl process for every file processed. Why not use xargs? (Also, ``-name "*"'' does nothing, so you could just lose it)
find ./ -type f | xargs ./somescript.pl
starts the least number of processes. More than one process may be started if the length of the command line grows beyond what's permitted.

Replies are listed 'Best First'.
Re: Re: Need to change, oh, every file at once?
by belg4mit (Prior) on Jan 22, 2002 at 12:55 UTC
    -name * is redundant with GNU find, other finds such as Solaris require this.

    UPDATE: Sorry, Sun requires a PATH which is optional for GNU.

    --
    perl -pe "s/\b;([st])/'\1/mg"

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://140620]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-03-29 01:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found