Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

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

by ariels (Curate)
on Jan 22, 2002 at 12:49 UTC ( #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 ./
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?

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2023-06-07 17:06 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (29 votes). Check out past polls.