From: Ian Kelling Date: Thu, 30 Mar 2017 23:33:32 +0000 (-0700) Subject: slightly better code X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=944ba8a96250f295335739530fa83d4b08dde585;p=log-quiet slightly better code --- 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