%g/^BEGIN:VEVENT/,/^END:VEVENT$/ join %!grep ^BEGIN:VEVENT # get 1st class feasts only: %!grep ';I. cl.' # get the start dates: %!grep -o 'DTSTART;VALUE=DATE:[0-9]\+' # numerical dates only: %!grep -o "[0-9]\+" # sort unique: %!sort -nu