Tag Archives: grep

Grep through files and replace

Want to replace recursively http://example.co.uk with http://10.0.0.7 and also create backups of the files modified: grep -rFl “http://www.example.co.uk” /path¬† | xargs sed -i.bak ‘s/http:\/\/www.example.co.uk/http:\/\/10.0.0.7/g’

Posted in Linux | Tagged , , | Leave a comment