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
#!/usr/bin/zsh | |
#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="http://mitpress.mit.edu/sicp/full-text/book/#g' book.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment