Last active
August 29, 2015 14:20
-
-
Save daviddavis/c60c5d3601ee63bcd7af to your computer and use it in GitHub Desktop.
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
files = Dir["**/*.rb"] | |
puts "Checking #{files.length}" | |
files.each do |filename| | |
file = File.open(filename, "r") | |
content = file.read | |
file.close | |
if content =~ /^# Copyright 201\d Red Hat, Inc.$/ | |
puts "Editing #{filename}" | |
content = content.gsub(/\A\s*(^#.*$\n){11,11}\s*/, "") | |
File.open(filename, 'w') { |file| file.write(content)} | |
end | |
end |
ehelms
commented
May 6, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment