Created
July 1, 2010 01:09
-
-
Save jrun/459417 to your computer and use it in GitHub Desktop.
This sucks. What is the better way?
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/env ruby | |
find = ARGV[0] | |
replace = ARGV[1] | |
`ack '#{find}' -l`.split.each do |f| | |
`sed -i 's/#{find}/#{replace}/g' #{f}` | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment