Skip to content

Instantly share code, notes, and snippets.

@u1tnk
Created February 29, 2012 15:21
Show Gist options
  • Select an option

  • Save u1tnk/1941518 to your computer and use it in GitHub Desktop.

Select an option

Save u1tnk/1941518 to your computer and use it in GitHub Desktop.
grep and replace by ruby oneliner
find . -name "*.xml" -print0 | xargs -0 ruby -i -p -e '$_.gsub! %r{hoge}, "fuga"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment