Find all .rb and .yml files in the /some/path directory tree and replace "some_phrase" with "replacement_phrase" in them
find /some/path -name "*rb" -o -name "*yml" | xargs grep -sl "some_phrase" | xargs sed -i -e 's/some_phrase/replacement_phrase/g'