Guest User

Untitled

a guest
Jul 20th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. # Perform an in-place (with backup) global search and replace on one or more files
  2.  
  3. $ ruby -i.bak -ple '$_.gsub!(/..../, "::::")' *
  4.  
  5. # Replace the ... with the regular expression that you're searching for,
  6. # and the ::: with what you want to replace it with.
  7. # Replace the file glob with whatever is appropriate.
Add Comment
Please, Sign In to add comment