From 165a41a967d2221a5774865d0521be03ae766923 Mon Sep 17 00:00:00 2001 From: xyz Date: Sun, 8 May 2022 20:01:47 -0700 Subject: dateft, variable one extra , at the end instead of front seems better --- home/xyz/.local/bin/dateft | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'home/xyz/.local/bin') diff --git a/home/xyz/.local/bin/dateft b/home/xyz/.local/bin/dateft index 8332dfb2..269cb7f0 100755 --- a/home/xyz/.local/bin/dateft +++ b/home/xyz/.local/bin/dateft @@ -6,10 +6,11 @@ while getopts cfF:t:T: opt; do c) tz_from="Asia/Shanghai";; f) tz_from="$(tzselect)";; F) tz_from="$OPTARG";; + # one extra ',' at the end will not let `for tz in ...` loop one extra time? t) for i in $(seq "$OPTARG"); do - tz_to="$tz_to,$(tzselect)" + tz_to="$(tzselect),$tz_to" done;; - T) tz_to="$OPTARG";; + T) tz_to="$OPTARG,$tz_to";; \?) exit 1;; esac done -- cgit v1.2.3-70-g09d2