X-Git-Url: http://git.pippins.net/embedvideo/.git/?a=blobdiff_plain;f=scripts%2Flist-dates.rb;fp=scripts%2Flist-dates.rb;h=0000000000000000000000000000000000000000;hb=598bd6905829d6675801d1256e4d4f37f2785bdb;hp=18cdef98418ccae7b6cd6bf4fcef24a2de738924;hpb=831e1711cdf96ccd26203aec08a46e5c09bca3bd;p=backups%2F.git diff --git a/scripts/list-dates.rb b/scripts/list-dates.rb deleted file mode 100755 index 18cdef9..0000000 --- a/scripts/list-dates.rb +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/ruby - -# Make sure the record separator is zero rather than new-line -$/ = "\0" - -# Create a set of backup dates -require 'set' -dates = SortedSet.new - -# Split each input record into 8 fields on spaces and grab the 7th as integer -date_array = ARGF.map { |rec| rec.split( ' ', 8 )[6].to_i } - -# Merge the dates into the set -dates.merge date_array - -# Output the sorted set -puts dates.to_a