Sha256: e8a930f9d55d930d3bf530ade8cf7237fb42d01a5b28f5067f41b4182590a4fe
Contents?: true
Size: 448 Bytes
Versions: 12
Compression:
Stored size: 448 Bytes
Contents
#! /usr/bin/env ruby # Given an array of domains, removes them from the list # Example usage: script/prune foo.invalid, bar.invalid, foo.bar.invalid domains = ARGV domains = domains.clone.map { |d| d.gsub ",", "" } list = File.open("./config/domains.txt").read puts "Starting list: #{list.size} lines" domains.each do |domain| list.gsub! /^#{domain}$\n/, "" end puts "Ending list: #{list.size} lines" File.write "./config/domains.txt", list
Version data entries
12 entries across 12 versions & 1 rubygems