#!/bin/bash ### This shell script is used to create new events in caldav on the owncloud server ### Copied from https://gist.github.com/remyd1/a353b07219884c5878cc27d04aab9d96 and modified to fit my needs. # Usage output string. $0 is filename. usage="$0 categories date description [dtstart] [dtend] where categories is a comma separated list that MUST start with FRIST, WV or TERMIN and the second item in this list denotes the required alarm set." # print usage string if improper options, or if requested. if [ "$#" -lt 3 ] || [ "$1" == "-h" ] || [ "$1" == "--help" ]; then echo "$usage" exit 1 else # read login credentials and config BASEPATH=$(dirname $(realpath $0)) . $BASEPATH/.env # generate random UID starting here random1=`