#!/bin/sh #create a variable containing the date in the format YearMonthDay.HourMinute, example 20100329.1553 dt=`date +%Y%m%d.%H%M` #next line gets the calendar and saves it with the concatenated name wget -O /home/scot/backups/calendars/CalendarA.Calendar.$dt.ics https://www.google.com/calendar/ical/username@gmail.com/private-1234123412341234/basic.ics #the line above this one is one line that probably wrapped on your screen #the next line emails you letting you know the script completed echo “Your Calendar has backed up” | mail -s “Cal backups” username@gmail.com