From e0f2a19e2b1e4b47e0c0ab78bcf036d818ff2eec Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Mon, 28 Jan 2019 18:00:42 -0800 Subject: [PATCH] use awk instead of cut --- upload_ics | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/upload_ics b/upload_ics index a093fbd..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 -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" -- 2.39.2