From: Don Armstrong Date: Tue, 29 Jan 2019 01:58:01 +0000 (-0800) Subject: supress outputing filenames X-Git-Url: https://git.donarmstrong.com/?p=bin.git;a=commitdiff_plain;h=0700104ffe4416dcc7d54795d2d7669cd8be231d supress outputing filenames --- diff --git a/upload_ics b/upload_ics index 39e3855..a093fbd 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" | cut -d: -f0)) + eevents=($(grep -hn END:VEVENT "$file" | cut -d: -f0)) ehead=${bevents[0]} let "ehead -= 1"