Using Find & Sed to replace a pattern in multiple files…

Of course this can be altered for use with any file type and regex.

    find . -type f -exec sed -i {} -e ‘s/pattern1/pattern2/g’ \;

– D.

Explore posts in the same categories: Personal Notes

Comments are closed.