Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Perform an in-place (with backup) global search and replace on one or more files
- $ ruby -i.bak -ple '$_.gsub!(/..../, "::::")' *
- # Replace the ... with the regular expression that you're searching for,
- # and the ::: with what you want to replace it with.
- # Replace the file glob with whatever is appropriate.
Add Comment
Please, Sign In to add comment