Skip to content

Instantly share code, notes, and snippets.

@jacksonwillis
Created January 28, 2012 03:34
Show Gist options
  • Save jacksonwillis/1692445 to your computer and use it in GitHub Desktop.
Save jacksonwillis/1692445 to your computer and use it in GitHub Desktop.
And in ruby:
<code ruby>
files = File.read("/tmp/removeold.txt").split("\n").reject { |line| line =~ /^(#.*)?$/ }
files.each do |file|
puts "Deleting #{file}."
File.delete(file) rescue puts $!
end
</code>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment