in reply to simple command-line question

for i in `find .`; do sed -e's/mike/meathead/ig' $i > ${i}_NEW ; done

Replies are listed 'Best First'.
Re: Re: simple command-line question
by IlyaM (Parson) on Mar 05, 2002 at 09:17 UTC
      find . -type f -print0 | xargs -0 perl -i -pe 's/mike/meathead/ig'

      Might save you a few or several thousands of processes, depending on the number of files found -- and might be a good habit to make -- at least on systems where it works. (GNU find might be needed.)

      For anything more complex than one-liners, you might prefer to use File::Find;

      The Sidhekin
      print "Just another Perl ${\(trickster and hacker)},"