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/ruby | |
rev_10_file = File.open('rev_10.rev', 'a') | |
rev_172_file = File.new('rev_172.txt', 'w+') | |
rev_192_file = File.new("rev_192.txt", "w+") | |
Dir['/Users/andybaxter/bind/*.com'].each do |filename| | |
File.open(filename, 'r+').readlines.each do |line| | |
domain = line.split.first | |
ip = line.split.last |
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
# This is a quick script for doing a mass rename of all files in an Amazon S3 bucket. | |
# In this case, the rename operation was to unescape all filenames which had been | |
# previously escaped in error. | |
############################# | |
# Configuration: | |
bucketname = "YOUR_S3_BUCKET_NAME" | |
access_key = 'YOUR_ACCESS_KEY_ID' | |
secret_key = 'YOUR_SECRET_ACCESS_KEY' |