Skip to content

Instantly share code, notes, and snippets.

@thomaswitt
Created January 6, 2014 14:48
Show Gist options
  • Select an option

  • Save thomaswitt/8283782 to your computer and use it in GitHub Desktop.

Select an option

Save thomaswitt/8283782 to your computer and use it in GitHub Desktop.
Ruby One Line Replace
find . -name "*.extension" -print0 | xargs -0 ruby -i -p -e '$_.gsub! %r{(THIS)}, "THAT was \\1"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment