X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=upload_ics;h=ce96a8f4b3ba381405bb5197017fa93d60c4158f;hb=32dd5b77200d893951c21395995ffa942eca1d5f;hp=39e38555a0f6e1c3c4c2c99e5fe8189ef1c3d2af;hpb=090779c26defdd9d548378706d1e26e3396f3445;p=bin.git diff --git a/upload_ics b/upload_ics index 39e3855..ce96a8f 100755 --- a/upload_ics +++ b/upload_ics @@ -9,8 +9,8 @@ tempdir=$(readlink -f "$tempdir") trap "/bin/rm -f \"$tempdir\"/*.ics; rmdir \"$tempdir\"" QUIT INT EXIT for file in "$@"; do - bevents=($(grep -n BEGIN:VEVENT "$file" | cut -d: -f1)) - eevents=($(grep -n END:VEVENT "$file" | cut -d: -f1)) + 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"