Created
August 25, 2013 22:57
-
-
Save octagonal/6336810 to your computer and use it in GitHub Desktop.
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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