Frequently Asked Questions
Editing
How do I do a multi-file search and replace?
- If you know regular expressions then here are two examples.
- If your text exists all on one line you can use sed like Graham Stark did
- find . -name "*.html" | xargs sed 's/alt="\(.*\)"/alt="\1" title="\1"/g' --in-place
- which creates a title attribute wherever there was an alt attribute.
- If you text exists across more than one line then you need multiline mode.
- Follow the instructions here