From 944ba8a96250f295335739530fa83d4b08dde585 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Thu, 30 Mar 2017 16:33:32 -0700 Subject: [PATCH] slightly better code --- log-once | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/log-once b/log-once index 040e2ba..56961f9 100755 --- a/log-once +++ b/log-once @@ -65,11 +65,11 @@ state in the same directory. done fi glob="$c[0-9]*" - file=($glob); file="${file[0]}"; [[ $glob != $file ]] || file= + file=($glob); [[ $glob != $file ]] || file= if $log; then out=append if [[ $file ]]; then - i=${file#$c} + i="${file#$c}" if (( i < errors )); then new_file=$c$((i+1)) mv $file $new_file -- 2.30.2