in reply to changing inside a file

find . -name "*.html" -exec perl -pi -e's/ old / new /' {} \;;

-Waswas

Replies are listed 'Best First'.
Re: Re: changing inside a file
by amoura (Initiate) on Aug 26, 2002 at 18:21 UTC
    this seems to work but I get this error
    Can't do inplace edit without backup.
      find . -name "*.html" -exec perl -pi.bak -e's/ old / new /' {} \; ; This will put a <filename>.bak backup file in place for every file that gets updated.. you must be using Activestate perl huh? mine allows inplace without a backup..

      -Waswas