Last active
May 9, 2022 14:42
-
-
Save noahpryor/1b100f860e3b1ba48f7cde971fc7d4bc to your computer and use it in GitHub Desktop.
Loop and archive
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
# Assumes a file named gam-archive2.sh exists in the same folder | |
# along with a file named emails.txt that includes one email prefix per line of the people you want to delete | |
# e.g. something like this - no # symbols | |
# noah | |
# mike | |
# | |
# read the | |
emails = File.read("emails.txt").lines.map(&:chomp) | |
puts "#{emails.length} emails found in emails.txt" | |
# run the script for each email | |
emails.each do |email| | |
puts `sh gam-archive2.sh #{email} mail` | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment