trap "/bin/rm -f \"$tempdir\"/*.ics; rmdir \"$tempdir\"" QUIT INT EXIT
for file in "$@"; do
- bevents=($(grep -hn BEGIN:VEVENT "$file" | cut -d: -f0))
- eevents=($(grep -hn END:VEVENT "$file" | cut -d: -f0))
+ bevents=($(grep -hn BEGIN:VEVENT "$file" | awk -F: '{print $1}'))
+ eevents=($(grep -hn END:VEVENT "$file" | awk -F: '{print $1}'))
ehead=${bevents[0]}
let "ehead -= 1"