Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Substitute in a file according to a pattern and save it back to that file, while at the same time making a backup called %file%.back
#You don't need to use / as a delimiter, especially not when it's not convenient.
sudo sed -i.back 's#<img src="#<img src="' book.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment