in reply to Re^4: Find and Replace text script?
in thread Find and Replace text script?

You have spaces in your file and/or directory names and I claim my five pounds. Try

find . -name '*.html' -print0 | xargs -0 perl -pi -e 's/php\?/html/g'

/J\

Replies are listed 'Best First'.
Re^6: Find and Replace text script?
by bobafifi (Beadle) on Jul 13, 2006 at 21:08 UTC
    > You have spaces in your file and/or directory names

    Nope, no spaces in either. I just tried your code, it didn't crash or anything, just gave me a new line - files remain unchanged. Have you tried this on a test folder and got it to work? If so, can you please run down the steps? I'm obviously doing something wrong ...

    Thanks,

    -Bob