http://qs1969.pair.com?node_id=140620


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"