Created
September 17, 2019 15:05
Revisions
-
jgamblin created this gist
Sep 17, 2019 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ #!/usr/bin/env bash # Check a List Of Emails For Open Google Calendars. if [[ $# -eq 0 ]]; then echo 'Please provide a list email addresses to check.' exit 1 fi email_list="$1" for email_address in $(cat $email_list); do status=$(curl -s -o /dev/null -w "%{http_code}" "https://calendar.google.com/calendar/htmlembed?src=$email_address" 2> /dev/null ) if [ "$status" = 200 ]; then printf "%s" "$email_address" printf "\n" else : fi done < "$email_list"